summaryrefslogtreecommitdiff
path: root/plugins/SecureIM/main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-16 18:28:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-16 18:28:49 +0000
commitf7e482e4333df76b198b16c7685c2304007fbe79 (patch)
treedbc5bbd793cba9d4a7ce9c7440664318c53a0d02 /plugins/SecureIM/main.cpp
parent5b0a53a6d3f1b8d70b34631d96d3815d0a334dd3 (diff)
dynamic dll checker
git-svn-id: http://svn.miranda-ng.org/main/trunk@989 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/main.cpp')
-rw-r--r--plugins/SecureIM/main.cpp21
1 files changed, 7 insertions, 14 deletions
diff --git a/plugins/SecureIM/main.cpp b/plugins/SecureIM/main.cpp
index 425a2ec08a..205a025ffe 100644
--- a/plugins/SecureIM/main.cpp
+++ b/plugins/SecureIM/main.cpp
@@ -1,9 +1,8 @@
#include "commonheaders.h"
-
int hLangpack = 0;
-extern "C" BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) {
+BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) {
g_hInst = hInst;
if (dwReason == DLL_PROCESS_ATTACH) {
INITCOMMONCONTROLSEX icce = {
@@ -14,17 +13,13 @@ extern "C" BOOL APIENTRY DllMain(HINSTANCE hInst, DWORD dwReason, LPVOID) {
return TRUE;
}
+extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_SECUREIM, MIID_LAST};
-PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) {
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
return &pluginInfoEx;
}
-
-MUUID* MirandaPluginInterfaces(void) {
- return interfaces;
-}
-
-
void AddServiceFunction(LPCSTR serviceName, MIRANDASERVICE serviceFunction) {
g_hService = (HANDLE*) mir_realloc(g_hService,sizeof(HANDLE)*(iService+1));
@@ -79,9 +74,8 @@ HANDLE AddSubItem(HANDLE rootid,LPCSTR name,int pos,int poppos,LPCSTR service,WP
}
-int __cdecl Load(void) {
-
-
+extern "C" __declspec(dllexport) int __cdecl Load(void)
+{
DisableThreadLibraryCalls(g_hInst);
InitializeCriticalSection(&localQueueMutex);
@@ -168,8 +162,7 @@ int __cdecl Load(void) {
return 0;
}
-
-int __cdecl Unload() {
+extern "C" __declspec(dllexport) int __cdecl Unload() {
DeleteCriticalSection(&localQueueMutex);
return 0;
}