Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C++ Leda > CALLBCAK proble...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 193 of 212
Post > Topic >>

CALLBCAK problem

by "Mohamed Fysal" <fysal@[EMAIL PROTECTED] > Feb 24, 2005 at 04:01 PM

I have written a Regular DLL with many Ex****t Functions and one CALLBACK
fun
ction .


The callback function declared in the .cpp file of the Regular DLL is as
fol
lows:

typedef BOOL (CALLBACK* ExProcessMessage)(UINT msg, LPVOID lpParam);
//
ExProcessMessage MyProcMsg;

----------------------------------------------------------------------------
--------------------

I have written an MFC Application which is dynamically linked to this
Regula
r DLL.

In the MFC Application (SDI Application with DOC/VIEW sup****t) , I also
use
threading functionalities.

In the MFC Application I have declared a global function as a CALLBACK
funct
ion as follows:


BOOL CALLBACK OnCMFMessage(UINT msg, LPVOID lpParam1);



I initilaise the address of this function to the pointer varaible declared
i
n DLL (MyProcMsg) as follows in my MFC App code:


InitializeCB((long)&OnCMFMessage); -- (whereas the InitializeCB is a
ex****t
function in DLL to initialise the callback function pointer)



----------------------------

Now the problem is , when I call the CALLBACK function (OnCMFMessage) from
m
y DLL by using the function pointer , the callbcak function is not at all
ca
lled. What could be the reason?????

But when I use the as said above with a Win32 application, it worked fine.
M
y callbcak is called. And I got the desired result.
The problem was only with the MFC App which I said above.
 




 1 Posts in Topic:
CALLBCAK problem
"Mohamed Fysal"  2005-02-24 16:01:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 15:37:55 CDT 2008.