summaryrefslogtreecommitdiff
path: root/plugins/IEHistory/src/IEHistory.cpp
diff options
context:
space:
mode:
authorRené Schümann <white06tiger@gmail.com>2014-08-21 11:42:31 +0000
committerRené Schümann <white06tiger@gmail.com>2014-08-21 11:42:31 +0000
commit2ae4a360da9638ecaaa68bbb683187ef8e1faf35 (patch)
tree99a533c91fccdd70bb8bde2360f42bd5a6b7703b /plugins/IEHistory/src/IEHistory.cpp
parentd33b48c34e2ce98bd5a73698006be3859a7dfbc4 (diff)
IEHistory: Miranda NG compatibility.
- removed mirandaMem * GetWindowLong => GetWindowLongPtr * SetWindowLong => SetWindowLongPtr * DLGPROC returning int/BOOL => INT_PTR * CallService(MS_DB_EVENT_*) => db_event_* * DBGetContactSetting* => db_get_* * DBWriteContactSetting => db_set_* * contact HANDLE => MCONTACT * CallService(MS_CLIST_ADD*MENUITEM,...) => Menu_Add*MenuItem() * improved GetContactName() - removed some #pragma warning's * version bump to 0.0.1.5 git-svn-id: http://svn.miranda-ng.org/main/trunk@10253 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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;
}