MFC Extension DLL
-
I have a MFC Extension Dll which contains a class that takes in a CTreeCtrl pointer. The class searches a string in the tree. From my main program when a call this class in debug mode it works ok but in release mode it crashes. I am using win 2k and visual studio 6.0. The message box that pops up at crash says reference memory which was null (or something like it I could not remember the exact message) When I move this class to the main executable's project it again works fine. Do I need to declare some macros in an extension dll before accessing and mfc object or can I pass around pointers freely between dlls as long as I am in the same thread ? Any help is appreciated. Orcun Colak
-
I have a MFC Extension Dll which contains a class that takes in a CTreeCtrl pointer. The class searches a string in the tree. From my main program when a call this class in debug mode it works ok but in release mode it crashes. I am using win 2k and visual studio 6.0. The message box that pops up at crash says reference memory which was null (or something like it I could not remember the exact message) When I move this class to the main executable's project it again works fine. Do I need to declare some macros in an extension dll before accessing and mfc object or can I pass around pointers freely between dlls as long as I am in the same thread ? Any help is appreciated. Orcun Colak
Here is one reference. http://www.mindcracker.com/mindcracker/c\_cafe/dll/extn\_dll\_dlg.asp Kuphryn
-
I have a MFC Extension Dll which contains a class that takes in a CTreeCtrl pointer. The class searches a string in the tree. From my main program when a call this class in debug mode it works ok but in release mode it crashes. I am using win 2k and visual studio 6.0. The message box that pops up at crash says reference memory which was null (or something like it I could not remember the exact message) When I move this class to the main executable's project it again works fine. Do I need to declare some macros in an extension dll before accessing and mfc object or can I pass around pointers freely between dlls as long as I am in the same thread ? Any help is appreciated. Orcun Colak
Are you calling AFX_MANAGE_STATE macros at the very beginning of any exported function from the dll?? If you do not you may have problems sharing mfc resources and so on... Have a look on the wizard's comments added on the cpp file automaticaly created to content the CAPP derived object. hope to be useful Greetings... Just three words: void main(void)