[Cppunit-devel] CppUnit and Extension DLL vs. Regular DLL
Brought to you by:
blep
From: Steffen H. <ste...@we...> - 2002-08-23 10:10:46
|
Hi, I want to run the TestRunner Dialog (controlled in testrunner.dll) out of a ActiveX control (OCX). The problem is that testrunner.dll is built as an MFC Extension DLL. It was generated by Visual C++ wizard where this problem seems to be known because in TestRunnerApp.cpp following comment is also describing my problem: // Insert this DLL into the resource chain // NOTE: If this Extension DLL is being implicitly linked to by // an MFC Regular DLL (such as an ActiveX Control) // instead of an MFC application, then you will want to // remove this line from DllMain and put it in a separate // function exported from this Extension DLL. The Regular DLL // that uses this Extension DLL should then explicitly call that // function to initialize this Extension DLL. Otherwise, // the CDynLinkLibrary object will not be attached to the // Regular DLL's resource chain, and serious problems will // result. I followed these instructions but nothing changed. What really is the advantage of using Extension DLL, I don`t know? The only point I can image is to no longer need to use macro AFX_MANAGE_STATE. First of all it chrashes because no resources of the testrunner.dll are found. Then I add "AfxSetResourceHandle(::GetModuleHandle("testrunner.dll"))" and the resources are found but then it crashes while creating the dialog because AfxGetInstanceHandle() returns NULL. Does anyone of you has an idea to fix this? The only one solution for me at the moment is to build an additional regular dll using the same code. Such a dll is running out of an OCX without problems. What do you think about adding this DLL to CppUnit? Best regards Steffen ______________________________________________________________________________ Wieviele E-Mail-Adressen haben Sie? Eine, funf oder gar zehn? Verwalten Sie doch einfach alle unter: http://freemail.web.de/?mc=021120 |