summaryrefslogtreecommitdiff
path: root/plugins/IEHistory/src/IEHistory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/IEHistory/src/IEHistory.cpp')
-rw-r--r--plugins/IEHistory/src/IEHistory.cpp49
1 files changed, 12 insertions, 37 deletions
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp
index 33e892992f..86f93ed20c 100644
--- a/plugins/IEHistory/src/IEHistory.cpp
+++ b/plugins/IEHistory/src/IEHistory.cpp
@@ -23,13 +23,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "commonheaders.h"
#include "services.h"
+int hLangpack;//Miranda NG langpack used by translate functions, filled by mir_getLP()
char ModuleName[] = "IEHistory";
HICON hIcon;
HINSTANCE hInstance;
HANDLE hOpenWindowsList = NULL;
-PLUGINLINK *pluginLink;
-
HMODULE hUxTheme = 0;
BOOL (WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD) = NULL;
@@ -42,27 +41,17 @@ BOOL (WINAPI *MyEnableThemeDialogTexture)(HANDLE, DWORD) = NULL;
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
__PLUGIN_DISPLAY_NAME,
- VERSION,
+ __VERSION_DWORD,
__DESC,
- __AUTHOR,
- __AUTHOREMAIL,
+ __AUTHOR,__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- DEFMOD_UIHISTORY,
-#ifdef _UNICODE
- {0x2f093b88, 0xf389, 0x44f1, {0x9e, 0x2a, 0x37, 0xc2, 0x91, 0x94, 0x20, 0x3a}} //{2f093b88-f389-44f1-9e2a-37c29194203a}
-#else
- {0x2f997250, 0xbc2f, 0x46f0, {0xa3, 0x3e, 0x65, 0xf0, 0x62, 0x83, 0xbe, 0x5d}} //{2f997250-bc2f-46f0-a33e-65f06283be5d}
-#endif
+ {0x2f093b88, 0xf389, 0x44f1, {0x9e, 0x2a, 0x37, 0xc2, 0x91, 0x94, 0x20, 0x3a}} //{2f093b88-f389-44f1-9e2a-37c29194203a}
};
-OLD_MIRANDAPLUGININFO_SUPPORT;
-
extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
{
- Log("%s", "Entering function " __FUNCTION__);
- Log("%s", "Leaving function " __FUNCTION__);
return &pluginInfo;
}
@@ -75,8 +64,9 @@ extern "C" __declspec(dllexport) const MUUID *MirandaPluginInterfaces()
#include <commctrl.h>
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void)
{
+ mir_getLP(&pluginInfo);
INITCOMMONCONTROLSEX icex;
icex.dwSize = sizeof(icex);
@@ -84,48 +74,33 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
InitCommonControlsEx(&icex);
- if((hUxTheme = LoadLibraryA("uxtheme.dll")) != 0)
- {
+ if((hUxTheme = LoadLibraryA("uxtheme.dll")) != 0){
MyEnableThemeDialogTexture = (BOOL (WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");
}
- Log("%s", "Entering function " __FUNCTION__);
- pluginLink = link;
//all initialization here
hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HISTORYICON));
- InitializeMirandaMemFunctions();
- Log("%s", "Creating service functions ...");
InitServices();
- Log("%s", "Hooking events ...");
HookEvents();
- Log("%s", "Leaving function " __FUNCTION__);
return 0;
}
extern "C" int __declspec(dllexport) Unload()
{
- Log("%s", "Entering function " __FUNCTION__);
- Log("%s", "Unhooking events ...");
-
- Log("%s", "Destroying service functions ...");
DestroyServices();
- Log("%s", "Closing all open windows ...");
WindowList_Broadcast(hOpenWindowsList, WM_CLOSE, 0, 0);
-
- Log("%s", "Leaving function " __FUNCTION__);
return 0;
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
hInstance = hinstDLL;
- if (fdwReason == DLL_PROCESS_ATTACH)
- {
- DisableThreadLibraryCalls(hinstDLL);
- LogInit();
- }
- return TRUE;
+ if(fdwReason == DLL_PROCESS_ATTACH){
+ DisableThreadLibraryCalls(hinstDLL);
+ LogInit();
+ }
+ return TRUE;
}