From 1dde355843ce5d2023e56fe3a8ff142b9eebe76a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 2 Jul 2012 14:06:05 +0000 Subject: adaptation of cryptlib for VS2010 git-svn-id: http://svn.miranda-ng.org/main/trunk@713 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CryptoPP/main.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'plugins/CryptoPP/main.cpp') diff --git a/plugins/CryptoPP/main.cpp b/plugins/CryptoPP/main.cpp index b3adb93153..8f3d89aa34 100644 --- a/plugins/CryptoPP/main.cpp +++ b/plugins/CryptoPP/main.cpp @@ -3,10 +3,11 @@ int hLangpack; // dllmain -BOOL WINAPI DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) { - g_hInst = hInst; +BOOL WINAPI DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) +{ if ( dwReason == DLL_PROCESS_ATTACH ) { - { + g_hInst = hInst; + char temp[MAX_PATH]; GetTempPath(sizeof(temp),temp); GetLongPathName(temp,TEMP,sizeof(TEMP)); @@ -15,7 +16,6 @@ BOOL WINAPI DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) { TEMP_SIZE--; TEMP[TEMP_SIZE]='\0'; } - } InitializeCriticalSection(&localQueueMutex); InitializeCriticalSection(&localContextMutex); #ifdef _DEBUG @@ -38,19 +38,15 @@ MUUID* MirandaPluginInterfaces(void) return interfaces; } - -int onModulesLoaded(WPARAM wParam,LPARAM lParam) { - // updater plugin support +int onModulesLoaded(WPARAM wParam,LPARAM lParam) +{ + // updater plugin support #if defined(_DEBUG) || defined(NETLIB_LOG) InitNetlib(); #endif - if(ServiceExists(MS_UPDATE_REGISTERFL)) { - CallService(MS_UPDATE_REGISTERFL, (WPARAM)2669, (LPARAM)&pluginInfo); - } return 0; } - int Load(PLUGINLINK *link) { DisableThreadLibraryCalls(g_hInst); -- cgit v1.2.3