|
If any other information is there with you,Please forward it to me.
2 more question if possible.
1)
I've created the MFC extension DLL. My Idea is to whenever the filter
function notified the event of File Closed I want to find and copy the
path of the file in a variable, And there will be a function that returns
the path stored in the variable. What do you think?
2)
If I want to create the COM DLL instead of the MFC extension DLL,then I
have to add One CoClass in the DLL.In this CoClass I am thinking of
adding a function that installs the hook. For installing the hook I've to
use the SetWindowsHook function,In this function I've to Give the
HINSTANCE of the dll as the first argument. So the Question is How do I
provide my Coclass the HINSTANCE of the COM DLL.
ritz1234
|
|
|
|
|
ritz1234 wrote: And there will be a function that returns
the path stored in the variable. What do you think?
Its ok. Keep in mind that the variable should be kept in shared section.
ritz1234 wrote: So the Question is How do I
provide my Coclass the HINSTANCE of the COM DLL.
Why should you go for COM dll, while an ordinary dll will fit?
How ever I still remind you that, your hook function will not be called when ever a file is closed in an applicaiton . First check that, then only you need to think about further things..isnt it..
|
|
|
|
|
Thanks for the help buddy.
Actually I've tried using the variable that is global but not shared so
this doesn't give me the reuslt as expcted.So i've find out that I should
use the shared variable here.
Answer of your question.
1)I am going to use this DLL in the toolbar that will be developed next.
Because this is the MFC extension DLL I think It won't work with ATL.
That's why I think I have to write a COM dll that will Install,Uninstall
the hook. And will give me the path of the file that is closed upon
periodically calling this function. So seriously there is any way to use
HINSTANCE of COM DLL in CoClass?
ritz1234
|
|
|
|
|
ritz1234 wrote: Because this is the MFC extension DLL I think It won't work with ATL.
No need to worry, it will work..
|
|
|
|
|
Hi All,
Just like Sun certification Exams for JAVA. Is there any Certification Exam for VC++ Professionals conducted by Microsoft.
Please give me the Information about this.
|
|
|
|
|
G.L.Prasad wrote: Is there any Certification Exam for VC++ Professionals conducted by Microsoft.
No, not any more. They'll give out certificates only on .NET now.
If you have the skill, I don't think you will ever need such a certificate. But that's just my opinion.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: If you have the skill, I don't think you will ever need such a certificate. But that's just my opinion.
And having the certificate doesn't always imply you have the skills (but this is going on my arrogant...).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
So, let's arrive on a conclusion. Having a certificate and having the skills. They're mutually exclusive.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Or, using other words: certificate skills and VC++ ones are somewhat different.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Rajesh R Subramanian wrote: They're mutually exclusive.
mutually inclusive
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
How to check for or assign the positive/negative infinitive to an int variable?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
There are no infinities for int.
Maximum value of int is 2147483647
Minimum value of int is -2147483648
These are defined as INT_MAX and INT_MIN in the limits.h headers file. These files are VC++ specific, if you need portable way to getting these numbers then try numeric_limits class in c++.
-Saurabh
|
|
|
|
|
The values I gave are based on 32 bit int's. Since size of int is not same for all platforms, you should not directly use them. Instead use macros defined in limits.h file.
-Saurabh
|
|
|
|
|
Are you kidding?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
rp_suman wrote: positive/negative infinitive to an int variable
Did you mean to say float or double?
|
|
|
|
|
Hi,
I mean, in some cases, I want to return negative or positive infinitive as result.
And I want to check the returned value is whether negative/positive infinitive or other value.
I think there is some constant like BIGVALUE or something other than INT_MAX.
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Nope: all possible bit configurations of an int variable represent a valid int value (i.e. no special meanings).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Sometime I saw the number is becoming like "#.inf" in watch window after assigning result of divide by zero.
I thought, that means variable is having some value representing infinite.
But the VC++ IDE may be showing this after the divide by zero attempt.
Is it true?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
The number must be either float or double .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi,
Thanks a lot for help!!
So, can I compare returned float value is -ve or +ve infinitive?
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Yes, have a look here [^] and here [^] (some background).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi,
Thanks a lot for all help!!
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Hello,
I want a user defined function that can be called by every process running.
That is: -
void HelloWorld()
{
MessageBox(NULL, L"Hello World", "Test", 0);
}
I need a mechanism by which this function can be called inside every running process.
|
|
|
|
|
tony_udz wrote: I need a mechanism by which this function can be called inside every running process.
Write your funtion in the DllMain() of a dll and inject it to the process you need using CreateRemoteThread() API. For more details see Three Ways to Inject Your Code into Another Process[^]
|
|
|
|
|
Thanks! for your reply.
In Windows CE CreateRemoteThread() API is not supported. I have tried out many options but could not find a way to inject DLL.
|
|
|
|