BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { //----- Remove this if you use lpReserved UNREFERENCED_PARAMETER(lpReserved) ; if ( dwReason == DLL_PROCESS_ATTACH ) { _hdllInstance =hInstance ; DistLayerTreeDLL.AttachInstance (hInstance) ; InitAcUiDLL () ; } else if ( dwReason == DLL_PROCESS_DETACH ) { DistLayerTreeDLL.DetachInstance () ; } return (TRUE) ; }
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) { if (dwReason == DLL_PROCESS_ATTACH) { _hdllInstance = hInstance; // Extension DLL one time initialization FileNavDLL.AttachInstance(hInstance); InitAcUiDLL(); } else if (dwReason == DLL_PROCESS_DETACH) { // Terminate the library before destructors are called FileNavDLL.DetachInstance(); } return TRUE; // ok }
BOOL CSmileyUiApp::InitInstance() { InitAcUiDLL(); return CWinApp::InitInstance(); }