BOOL WINAPI DllMain ( HINSTANCE hInstDLL, DWORD dwFunction, LPVOID lpNot) { switch(dwFunction) { case DLL_PROCESS_ATTACH: /* for debug ********************************/ #ifdef _MY_DEBUG if(nDebugLevel){ if( (DebugLogFile=_tfopen( DEBUGLOGFILE, "w"))==NULL) MessageBox(NULL,"can not open Debuglogfile","debug",MB_OK); DebugLog(1,(DebugLogFile,"Entry in\n")); } #endif /********************************************/ hInst = hInstDLL; InitDictionary(); hUIFont = CreateFont(16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_TT_PRECIS, CLIP_TT_ALWAYS, ANTIALIASED_QUALITY, DEFAULT_PITCH, _T("���ו")); IMERegisterClass( hInst ); break; case DLL_PROCESS_DETACH: DeleteObject(hUIFont); UnregisterClass(UICLASSNAME,hInst); UnregisterClass(COMPCLASSNAME,hInst); UnregisterClass(CANDCLASSNAME,hInst); UnregisterClass(STATUSCLASSNAME,hInst); DestroyDictionary(); /* for debug ********************************/ #ifdef _MY_DEBUG if(nDebugLevel){ DebugLog(1,(DebugLogFile,"Entry out\n")); if(DebugLogFile!=NULL) fclose(DebugLogFile); } #endif /********************************************/ break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; } return TRUE; }
BOOL WINAPI DllMain ( HINSTANCE hInstDLL, DWORD dwFunction, LPVOID lpNot) { switch(dwFunction) { case DLL_PROCESS_ATTACH: TRACE(TEXT("Entry in\n")); hInst = hInstDLL; InitDictionary(); hUIFont = CreateFont(16, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_TT_PRECIS, CLIP_TT_ALWAYS, ANTIALIASED_QUALITY, DEFAULT_PITCH, _T("���ו")); TRACE(TEXT("Instance %d\n"), hInst); IMERegisterClass( hInst ); break; case DLL_PROCESS_DETACH: DeleteObject(hUIFont); UnregisterClass(UICLASSNAME,hInst); UnregisterClass(COMPCLASSNAME,hInst); UnregisterClass(CANDCLASSNAME,hInst); UnregisterClass(STATUSCLASSNAME,hInst); DestroyDictionary(); TRACE(TEXT("Entry out\n")); break; case DLL_THREAD_ATTACH: break; case DLL_THREAD_DETACH: break; } return TRUE; }
IniFile::~IniFile(void) { DestroyDictionary(); };