diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-07-20 16:21:49 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-07-20 16:21:49 +0000 |
commit | f424a18112032cf61d2871a6b91a5af607c171ae (patch) | |
tree | 88fedc4e28941ceecda7026f0b06eba6271f91d5 /plugins/CryptoPP/src/main.cpp | |
parent | bfe1bd0fc087be44c70904aee0fe4276643d206d (diff) |
CryptoPP:
changed folder structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@1083 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/CryptoPP/src/main.cpp')
-rw-r--r-- | plugins/CryptoPP/src/main.cpp | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/plugins/CryptoPP/src/main.cpp b/plugins/CryptoPP/src/main.cpp new file mode 100644 index 0000000000..a5613db216 --- /dev/null +++ b/plugins/CryptoPP/src/main.cpp @@ -0,0 +1,74 @@ +#include "commonheaders.h"
+
+int hLangpack;
+
+// dllmain
+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));
+ TEMP_SIZE = strlen(TEMP);
+ if (TEMP[TEMP_SIZE-1]=='\\') {
+ TEMP_SIZE--;
+ TEMP[TEMP_SIZE]='\0';
+ }
+ InitializeCriticalSection(&localQueueMutex);
+ InitializeCriticalSection(&localContextMutex);
+#ifdef _DEBUG
+ isVista = 1;
+#else
+ isVista = ( (DWORD)(LOBYTE(LOWORD(GetVersion()))) == 6 );
+#endif
+ }
+ //DLL_THREAD_ATTACH
+ return TRUE;
+}
+
+extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_CRYPTOPP, MIID_LAST};
+
+PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ return &pluginInfoEx;
+}
+
+int onModulesLoaded(WPARAM wParam,LPARAM lParam)
+{
+ // updater plugin support
+#if defined(_DEBUG) || defined(NETLIB_LOG)
+ InitNetlib();
+#endif
+ return 0;
+}
+
+int Load()
+{
+ DisableThreadLibraryCalls(g_hInst);
+
+ // get memoryManagerInterface address
+ mir_getLP(&pluginInfoEx);
+
+ // register plugin module
+ PROTOCOLDESCRIPTOR pd;
+ memset(&pd,0,sizeof(pd));
+ pd.cbSize = sizeof(pd);
+ pd.szName = (char*)szModuleName;
+ pd.type = PROTOTYPE_ENCRYPTION;
+ CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
+
+ // hook events
+ HookEvent(ME_SYSTEM_MODULESLOADED,onModulesLoaded);
+ return 0;
+}
+
+
+int Unload()
+{
+ return 0;
+}
+
+
+// EOF
|