Since you are able to use this DLL from another module, I would suspect that
the class x is exported correctly. If thats true, I dont see why you should
dependency on MFC.
How do you know that these methods are not being called. Perhaps they are
just failing for whatever reason. You can debug your dll by putting breaks
constructed correctly.
its a regualr mfc dll.
and what i mean by non mfc dll (calling dll) is its a win32 dll
I can not really post the code here
but it looks something like this:
and the prob is CallBackSendHello and setstat doesnt seem to get called
although it works when i write the sametning in an MFC app.
class x
{
public: a() (and other member function and varriable in it)
}
// not member of x
void callbackstatus(code);
void callbackSendHello(void*, void*);
..... so on
bool a(x, y, z....)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
x = InitConnection(x, y z);
// Set up the call back for Status
GetConnStatFunction( setstat);
OpenConn();
ret = SendHello(CallBackSendHello, x1, y1, z1);
if (ret != OK)
{
return false;
}
return true;
}
void setstat(ConnStatus code)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
switch (code)
{
case 1:...
case 2: ....
}
}
void CallBackSendHello(void *code, void *code2)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
.....do somehting
}
thanks
S
-----------
Ajay Kalra wrote:
i am having problem invoking an mfc callback function from a non mfc
dll.
What callback function? What MFC DLL is it? Regular or Extension? What
do you mean by a non MFC DLL? Is it a VB or Win32 or an .Net assembly?
---
Ajay