call from one dll to another dll
-
Hi All, I have a non mfc dll(does not contain the CWinApp) which needs to talk to 2nd dll which uses mfc as a shared dll.I want to make a call to the 2nd dll from the 1st one inorder to display a dialog box. I'm using LoadLibrary to load the 2nd dll from the 1st one and using GetProcAddress to get the address of the function which creates an object of dialog box and calls DoModal on it.But when I make a call in this manner, the code is crashing at ASSERT((p = pMap->LookupPermanent(m_hWnd)) != NULL || (p = pMap->LookupTemporary(m_hWnd)) != NULL); in Wincore.cpp Can anyone please tell me what the problem is. Thanks in advance Raghu
-
Hi All, I have a non mfc dll(does not contain the CWinApp) which needs to talk to 2nd dll which uses mfc as a shared dll.I want to make a call to the 2nd dll from the 1st one inorder to display a dialog box. I'm using LoadLibrary to load the 2nd dll from the 1st one and using GetProcAddress to get the address of the function which creates an object of dialog box and calls DoModal on it.But when I make a call in this manner, the code is crashing at ASSERT((p = pMap->LookupPermanent(m_hWnd)) != NULL || (p = pMap->LookupTemporary(m_hWnd)) != NULL); in Wincore.cpp Can anyone please tell me what the problem is. Thanks in advance Raghu
-
have u called AFX_MANAGE_STATE(AfxGetStaticModuleState()); in the first line of the function which creates the dialog? nave
yes i have done that
-
yes i have done that
-
from where should these functions be called
-
from where should these functions be called