From 9041884990018a761f55ec19cfbd572ba5ecde42 Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Fri, 4 May 2012 17:45:09 +0000 Subject: Yamn: x64 compilation fix git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@296 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- ExternalAPI/m_yamn.h | 6 +----- YAMN/main.cpp | 35 +++++------------------------------ YAMN/yamn.h | 3 +-- 3 files changed, 7 insertions(+), 37 deletions(-) diff --git a/ExternalAPI/m_yamn.h b/ExternalAPI/m_yamn.h index 921fcfb..7eebf75 100644 --- a/ExternalAPI/m_yamn.h +++ b/ExternalAPI/m_yamn.h @@ -7,10 +7,6 @@ //================================== VARIABLES STRUCT ======================================== // -#ifndef MIRANDASERVICE -typedef int (*MIRANDASERVICE)(WPARAM,LPARAM); -#endif - typedef struct CYAMNVariables { #define YAMN_VARIABLESVERSION 3 @@ -33,7 +29,7 @@ struct CExportedFunctions struct CExportedServices { char* ID; - int (* Ptr)(WPARAM,LPARAM); + INT_PTR (* Ptr)(WPARAM,LPARAM); }; // diff --git a/YAMN/main.cpp b/YAMN/main.cpp index d8495b5..05b7fd5 100644 --- a/YAMN/main.cpp +++ b/YAMN/main.cpp @@ -53,6 +53,7 @@ PLUGINLINK *pluginLink; YAMN_VARIABLES YAMNVar; int hLangpack; +struct MM_INTERFACE mmi; static const MUUID interfaces[] = {MUUID_YAMN_FORCECHECK, MIID_LAST}; @@ -60,7 +61,7 @@ PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), YAMN_SHORTNAME, YAMN_VERSION, - "Mail notifier and browser for Miranda IM. Included POP3 protocol.", + "Mail notifier and browser for Miranda IM. Included POP3 protocol. Mod for Mataes Pack.", "y_b tweety (majvan)", "francois.mean@skynet.be", "© (2002-2004 majvan) 2005-2007 tweety y_b Miranda community", @@ -225,31 +226,6 @@ void SetDefaultProtocolIcons() extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) { -#ifndef WIN2IN1 - OSVERSIONINFO OSversion; - - OSversion.dwOSVersionInfoSize=sizeof(OSVERSIONINFO); - - GetVersionEx(&OSversion); - switch(OSversion.dwPlatformId) - { - case VER_PLATFORM_WIN32s: - case VER_PLATFORM_WIN32_WINDOWS: -#ifndef WIN9X - MessageBoxA(NULL,"This YAMN cannot run on Windows 95, 98 or Me. Why? Read FAQ. You should download Win9x version.","YAMN error",MB_OK | MB_ICONSTOP); - return FALSE; -#else - break; -#endif - case VER_PLATFORM_WIN32_NT: -#ifdef WIN9X - MessageBoxA(NULL,"This YAMN is intended for Windows 95, 98 or Me. You should use native WinNT version.","YAMN error",MB_OK | MB_ICONSTOP); - return FALSE; -#else - break; -#endif - } -#endif // WIN2IN1 YAMNVar.hInst=hinstDLL; if(fdwReason==DLL_PROCESS_ATTACH) { @@ -417,6 +393,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) pluginLink=link; mir_getLP(&pluginInfo); + mir_getMMI(&mmi); YAMN_STATUS = ID_STATUS_OFFLINE; @@ -475,10 +452,8 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) } //Registering YAMN as protocol - PROTOCOLDESCRIPTOR pd; - - memset(&pd,0,sizeof(pd)); - pd.cbSize=sizeof(pd); + PROTOCOLDESCRIPTOR pd = {0}; + pd.cbSize=PROTOCOLDESCRIPTOR_V3_SIZE; pd.szName=ProtoName; pd.type=PROTOTYPE_PROTOCOL; diff --git a/YAMN/yamn.h b/YAMN/yamn.h index fa42d5a..d8afa9a 100644 --- a/YAMN/yamn.h +++ b/YAMN/yamn.h @@ -16,8 +16,7 @@ #include #include //For _chdir() -#define MIRANDA_VER 0x0600 -#define MIRANDA_CUSTOM_LP +#define MIRANDA_VER 0x0A00 #include //For hotkeys #include "win2k.h" -- cgit v1.2.3