summaryrefslogtreecommitdiff
path: root/plugins/AssocMgr/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/AssocMgr/main.cpp')
-rw-r--r--plugins/AssocMgr/main.cpp53
1 files changed, 14 insertions, 39 deletions
diff --git a/plugins/AssocMgr/main.cpp b/plugins/AssocMgr/main.cpp
index a689ad654d..2a1ad430a2 100644
--- a/plugins/AssocMgr/main.cpp
+++ b/plugins/AssocMgr/main.cpp
@@ -31,13 +31,13 @@ int hLangpack;
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
- "File Association Manager",
- PLUGIN_VERSION,
- "Handles file type associations and URLs like aim, ymsgr, xmpp, wpmsg, gg, tlen.", /* autotranslated */
- "H. Herkenrath",
- "hrathh@users.sourceforge.net",
- "© 2005-2007 H. Herkenrath",
- PLUGIN_WEBSITE,
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
UNICODE_AWARE,
0,
// {52685CD7-0EC7-44c1-A1A6-381612418202}
@@ -45,15 +45,9 @@ PLUGININFOEX pluginInfo={
};
static const MUUID interfaces[]={MIID_ASSOCMGR,MIID_AUTORUN,MIID_LAST};
-BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,void *pReserved)
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
- UNREFERENCED_PARAMETER(pReserved);
- if(fdwReason==DLL_PROCESS_ATTACH) {
- /* Do not call this from a DLL that is linked to the static C run-time library (CRT).
- * The static CRT requires DLL_THREAD_ATTACH and DLL_THREAD_DETATCH notifications
- * to function properly. */
- DisableThreadLibraryCalls(hInst=hinstDLL);
- }
+ hInst = hinstDLL;
return TRUE;
}
@@ -96,36 +90,21 @@ static int AssocMgrModulesLoaded(WPARAM wParam,LPARAM lParam)
return 0;
}
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-__declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
return &pluginInfo;
}
-__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
{
return interfaces;
}
-__declspec(dllexport) int Load(PLUGINLINK *link)
+extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
{
pluginLink=link;
mir_getLP(&pluginInfo);
- /* existance of MS_SYSTEM_GETVERSION and MS_LANGPACK_TRANSLATESTRING
- * is checked in MirandaPluginInfo().
- * Not placed in MirandaPluginInfo() to avoid MessageBoxes on plugin options.
- * Using ANSI as LANG_UNICODE might not be supported. */
- if(CallService(MS_SYSTEM_GETVERSION,0,0)<NEEDED_MIRANDA_VERSION) {
- char szText[256];
- mir_snprintf(szText,sizeof(szText),Translate("The File Association Manager Plugin can not be loaded. It requires Miranda IM %hs or later."),NEEDED_MIRANDA_VERSION_STR);
- MessageBoxA(NULL,szText,Translate("File Association Manager Plugin"),MB_OK|MB_ICONINFORMATION|MB_SETFOREGROUND|MB_TOPMOST|MB_TASKMODAL);
- return 1;
- }
-
if (!ServiceExists(MS_DB_CONTACT_GETSETTING_STR)) return 1; /* dbx3x v0.5.1.0 */
if(mir_getMMI(&mmi)) return 1;
if(mir_getUTFI(&utfi)) return 1;
@@ -140,15 +119,11 @@ __declspec(dllexport) int Load(PLUGINLINK *link)
return 0;
}
-__declspec(dllexport) int Unload(void)
+extern "C" __declspec(dllexport) int Unload(void)
{
UninitTest();
UninitDde();
UninitAssocList();
UnhookEvent(hHookModulesLoaded);
return 0;
-}
-
-#ifdef __cplusplus
-}
-#endif
+} \ No newline at end of file