diff options
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/AimOscar/aim.cpp | 6 | ||||
-rw-r--r-- | protocols/FacebookRM/main.cpp | 6 | ||||
-rw-r--r-- | protocols/GTalkExt/GTalkExt.cpp | 6 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/gg.c | 6 | ||||
-rw-r--r-- | protocols/Gadu-Gadu/gg.h | 1 | ||||
-rw-r--r-- | protocols/IRCG/main.cpp | 7 | ||||
-rw-r--r-- | protocols/IcqOscarJ/init.cpp | 5 | ||||
-rw-r--r-- | protocols/JabberG/jabber.cpp | 6 | ||||
-rw-r--r-- | protocols/MRA/Mra.cpp | 9 | ||||
-rw-r--r-- | protocols/MSN/msn.cpp | 6 | ||||
-rw-r--r-- | protocols/NewsAggregator/Src/NewsAggregator.cpp | 9 | ||||
-rw-r--r-- | protocols/Omegle/main.cpp | 6 | ||||
-rw-r--r-- | protocols/Quotes/Forex.cpp | 5 | ||||
-rw-r--r-- | protocols/Twitter/main.cpp | 6 | ||||
-rw-r--r-- | protocols/Weather/weather.cpp | 6 | ||||
-rw-r--r-- | protocols/YAMN/main.cpp | 9 | ||||
-rw-r--r-- | protocols/Yahoo/main.cpp | 10 | ||||
-rw-r--r-- | protocols/Yahoo/yahoo.h | 5 |
18 files changed, 51 insertions, 63 deletions
diff --git a/protocols/AimOscar/aim.cpp b/protocols/AimOscar/aim.cpp index 655fd0e42c..857d8481be 100644 --- a/protocols/AimOscar/aim.cpp +++ b/protocols/AimOscar/aim.cpp @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. char AIM_CAP_MIRANDA[16] = "MirandaA";
-PLUGINLINK *pluginLink;
+
int hLangpack;
HINSTANCE hInstance;
@@ -108,9 +108,9 @@ static int protoUninit(PROTO_INTERFACE* ppro) return 0;
}
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void)
{
- pluginLink = link;
+
mir_getLP(&pluginInfo);
hMooduleLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
diff --git a/protocols/FacebookRM/main.cpp b/protocols/FacebookRM/main.cpp index e287712d0c..0aca6c6a40 100644 --- a/protocols/FacebookRM/main.cpp +++ b/protocols/FacebookRM/main.cpp @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "common.h"
// TODO: Make following as "globals" structure?
-PLUGINLINK *pluginLink;
+
CLIST_INTERFACE* pcli;
int hLangpack;
@@ -120,9 +120,9 @@ int OnModulesLoaded(WPARAM,LPARAM) static HANDLE g_hEvents[1];
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void)
{
- pluginLink = link;
+
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
diff --git a/protocols/GTalkExt/GTalkExt.cpp b/protocols/GTalkExt/GTalkExt.cpp index fa1752e0b1..f5ba3ea918 100644 --- a/protocols/GTalkExt/GTalkExt.cpp +++ b/protocols/GTalkExt/GTalkExt.cpp @@ -28,7 +28,7 @@ #include "avatar.h"
#include "menu.h"
-PLUGINLINK *pluginLink;
+
int hLangpack;
#define MIID_PLUGINIFACE {0x08B86253, 0xEC6E, 0x4d09, { 0xB7, 0xA9, 0x64, 0xAC, 0xDF, 0x06, 0x27, 0xB8 }}
@@ -71,11 +71,11 @@ extern "C" int __declspec(dllexport) Unload(void) HICON g_hPopupIcon = 0;
extern HINSTANCE hInst;
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void)
{
g_hPopupIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_POPUP));
- pluginLink = link;
+
mir_getLP(&pluginInfo);
if (
!mir_getXI(&xi) ||
diff --git a/protocols/Gadu-Gadu/gg.c b/protocols/Gadu-Gadu/gg.c index 778f62eeb1..07e1e0b05b 100644 --- a/protocols/Gadu-Gadu/gg.c +++ b/protocols/Gadu-Gadu/gg.c @@ -42,7 +42,7 @@ static const MUUID interfaces[] = {MIID_PROTOCOL, MIID_LAST}; // Other variables
HINSTANCE hInstance;
-PLUGINLINK *pluginLink;
+
XML_API xi;
SSL_API si;
CLIST_INTERFACE *pcli;
@@ -562,12 +562,12 @@ static int gg_proto_uninit(PROTO_INTERFACE *proto) //////////////////////////////////////////////////////////
// When plugin is loaded
-int __declspec(dllexport) Load(PLUGINLINK * link)
+int __declspec(dllexport) Load(void)
{
WSADATA wsaData;
PROTOCOLDESCRIPTOR pd;
- pluginLink = link;
+
mir_getXI(&xi);
mir_getLP(&pluginInfo);
diff --git a/protocols/Gadu-Gadu/gg.h b/protocols/Gadu-Gadu/gg.h index 79abb3190e..7f247c553f 100644 --- a/protocols/Gadu-Gadu/gg.h +++ b/protocols/Gadu-Gadu/gg.h @@ -354,7 +354,6 @@ typedef void (__cdecl GGThreadFunc)(void*, void*); /////////////////////////////////////////////////
extern HINSTANCE hInstance;
-extern PLUGINLINK *pluginLink;
extern CLIST_INTERFACE *pcli;
extern list_t g_Instances;
diff --git a/protocols/IRCG/main.cpp b/protocols/IRCG/main.cpp index b94e26d614..c90a91ae32 100644 --- a/protocols/IRCG/main.cpp +++ b/protocols/IRCG/main.cpp @@ -22,8 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "irc.h"
#include "version.h"
-PLUGINLINK* pluginLink;
-HINSTANCE hInst = NULL;
+HINSTANCE hInst = NULL;
int hLangpack;
@@ -94,9 +93,9 @@ static int ircProtoUninit( CIrcProto* ppro ) return 0;
}
-extern "C" int __declspec(dllexport) Load( PLUGINLINK *link )
+extern "C" int __declspec(dllexport) Load( )
{
- pluginLink = link;
+
mir_getLP( &pluginInfo );
AddIcons();
diff --git a/protocols/IcqOscarJ/init.cpp b/protocols/IcqOscarJ/init.cpp index db0af2db23..c876fef7b2 100644 --- a/protocols/IcqOscarJ/init.cpp +++ b/protocols/IcqOscarJ/init.cpp @@ -38,7 +38,6 @@ #include "m_extraicons.h"
HINSTANCE hInst;
-PLUGINLINK* pluginLink;
int hLangpack;
DWORD MIRANDA_VERSION;
@@ -104,9 +103,9 @@ static int OnModulesLoaded( WPARAM, LPARAM ) }
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void)
{
- pluginLink = link;
+
mir_getLP( &pluginInfo );
// Get Miranda version
diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp index a5f21e2613..a325778bcd 100644 --- a/protocols/JabberG/jabber.cpp +++ b/protocols/JabberG/jabber.cpp @@ -41,7 +41,7 @@ Last change by : $Author: borkra $ #include "m_extraicons.h"
HINSTANCE hInst;
-PLUGINLINK *pluginLink;
+
int hLangpack;
int g_cbCountries;
@@ -224,9 +224,9 @@ static int jabberProtoUninit( CJabberProto* ppro ) return 0;
}
-extern "C" int __declspec( dllexport ) Load( PLUGINLINK *link )
+extern "C" int __declspec( dllexport ) Load( )
{
- pluginLink = link;
+
// set the memory, lists & utf8 managers
mir_getXI( &xi );
diff --git a/protocols/MRA/Mra.cpp b/protocols/MRA/Mra.cpp index 0cf1e55d46..4b476ed62f 100644 --- a/protocols/MRA/Mra.cpp +++ b/protocols/MRA/Mra.cpp @@ -1,6 +1,6 @@ #include "Mra.h"
-PLUGINLINK *pluginLink;
+
MRA_SETTINGS masMraSettings;
int hLangpack;
@@ -62,7 +62,7 @@ extern "C" MRA_API const MUUID* MirandaPluginInterfaces() }
-extern "C" MRA_API int Load(PLUGINLINK *link)
+extern "C" MRA_API int Load(void)
{
SIZE_T dwBuffLen;
WCHAR szBuff[MAX_FILEPATH];
@@ -70,8 +70,9 @@ extern "C" MRA_API int Load(PLUGINLINK *link) LPWSTR lpwszFileName;
PROTOCOLDESCRIPTOR pd={0};
- pluginLink=link;
- mir_getLP(&pluginInfoEx);
+
+ mir_getLP(&pluginInfoEx);
+
// Get module name from DLL file name
if (GetModuleFileName(masMraSettings.hInstance,szBuff,MAX_FILEPATH))
diff --git a/protocols/MSN/msn.cpp b/protocols/MSN/msn.cpp index 16b11dedaa..2e9200bc59 100644 --- a/protocols/MSN/msn.cpp +++ b/protocols/MSN/msn.cpp @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "version.h"
HINSTANCE hInst;
-PLUGINLINK *pluginLink;
+
int hLangpack;
TIME_API tmi;
@@ -112,9 +112,9 @@ static int msnProtoUninit(CMsnProto* ppro) /////////////////////////////////////////////////////////////////////////////////////////
// Performs a primary set of actions upon plugin loading
-extern "C" int __declspec(dllexport) Load(PLUGINLINK* link)
+extern "C" int __declspec(dllexport) Load(void)
{
- pluginLink = link;
+
mir_getTMI(&tmi);
mir_getLP(&pluginInfo);
diff --git a/protocols/NewsAggregator/Src/NewsAggregator.cpp b/protocols/NewsAggregator/Src/NewsAggregator.cpp index 694eb46bea..61583d1890 100644 --- a/protocols/NewsAggregator/Src/NewsAggregator.cpp +++ b/protocols/NewsAggregator/Src/NewsAggregator.cpp @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. #include "Common.h"
HINSTANCE hInst = NULL;
-PLUGINLINK *pluginLink;
+
int hLangpack;
HANDLE hOptHook = NULL, hLoadHook = NULL, hOnPreShutdown = NULL, hPrebuildMenuHook = NULL, hPackUpdaterFolder = NULL;
HANDLE hProtoService[7];
@@ -65,11 +65,12 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) return interfaces;
}
-extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
+extern "C" __declspec(dllexport) int Load(void)
{
- pluginLink = link;
+
mir_getLP(&pluginInfoEx);
- mir_getXI(&xi);
+ mir_getXI(&xi);
+
if (ServiceExists(MS_FOLDERS_REGISTER_PATH))
{
hPackUpdaterFolder = FoldersRegisterCustomPathT("News Aggregator", "Avatars", MIRANDA_USERDATAT _T("\\Avatars\\")_T(DEFAULT_AVATARS_FOLDER));
diff --git a/protocols/Omegle/main.cpp b/protocols/Omegle/main.cpp index c3413f38fe..7ae6faf53c 100644 --- a/protocols/Omegle/main.cpp +++ b/protocols/Omegle/main.cpp @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "common.h"
// TODO: Make following as "globals" structure?
-PLUGINLINK *pluginLink;
+
CLIST_INTERFACE* pcli;
int hLangpack;
@@ -120,9 +120,9 @@ int OnModulesLoaded(WPARAM,LPARAM) static HANDLE g_hEvents[1];
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void)
{
- pluginLink = link;
+
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
diff --git a/protocols/Quotes/Forex.cpp b/protocols/Quotes/Forex.cpp index f7df776ee2..47c258b259 100644 --- a/protocols/Quotes/Forex.cpp +++ b/protocols/Quotes/Forex.cpp @@ -31,7 +31,6 @@ #include "m_Quotes.h"
#include "version.h"
-PLUGINLINK* pluginLink = NULL;
int hLangpack;
HANDLE g_hEventWorkThreadStop;
@@ -435,9 +434,9 @@ extern "C" return interfaces;
}
- int __declspec(dllexport) Load(PLUGINLINK *link)
+ int __declspec(dllexport) Load(void)
{
- pluginLink = link;
+
mir_getLP(&Global_pluginInfo);
// if ((mirandaVersion >= 0x0800) && (1 == mir_getXI(&xi)))
// {
diff --git a/protocols/Twitter/main.cpp b/protocols/Twitter/main.cpp index cc9ddc95c2..c035271b34 100644 --- a/protocols/Twitter/main.cpp +++ b/protocols/Twitter/main.cpp @@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "m_updater.h"
-PLUGINLINK *pluginLink;
+
CLIST_INTERFACE* pcli;
HINSTANCE g_hInstance;
@@ -114,9 +114,9 @@ int OnModulesLoaded(WPARAM,LPARAM) static HANDLE g_hEvents[1];
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void)
{
- pluginLink = link;
+
mir_getLP(&pluginInfo);
pcli = reinterpret_cast<CLIST_INTERFACE*>( CallService(
diff --git a/protocols/Weather/weather.cpp b/protocols/Weather/weather.cpp index 94d2e77881..426e37b483 100644 --- a/protocols/Weather/weather.cpp +++ b/protocols/Weather/weather.cpp @@ -58,7 +58,7 @@ BOOL ThreadRunning; BOOL ModuleLoaded;
-PLUGINLINK *pluginLink;
+
// plugin info
// VER = version, AUTH = author, defined in weather.h
@@ -213,12 +213,12 @@ extern "C" int __declspec(dllexport) Unload(void) return 0;
}
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void)
{
PROTOCOLDESCRIPTOR pd = {0};
DWORD lastver;
- pluginLink = link;
+
mir_getLP(&pluginInfoEx);
// initialize global variables
diff --git a/protocols/YAMN/main.cpp b/protocols/YAMN/main.cpp index f2385036a8..7fb6248768 100644 --- a/protocols/YAMN/main.cpp +++ b/protocols/YAMN/main.cpp @@ -33,7 +33,7 @@ HANDLE hAccountFolder; HINSTANCE *hDllPlugins;
static int iDllPlugins = 0;
-PLUGINLINK *pluginLink;
+
YAMN_VARIABLES YAMNVar;
int hLangpack;
@@ -398,12 +398,13 @@ static void LoadPlugins() }
}
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void)
{
int i, k;
- pluginLink = link;
- mir_getLP(&pluginInfo);
+
+ mir_getLP(&pluginInfo);
+
YAMN_STATUS = ID_STATUS_OFFLINE;
// we get the Miranda Root Path
diff --git a/protocols/Yahoo/main.cpp b/protocols/Yahoo/main.cpp index 222c4d6723..d9b7278102 100644 --- a/protocols/Yahoo/main.cpp +++ b/protocols/Yahoo/main.cpp @@ -21,7 +21,6 @@ * Global Variables
*/
HINSTANCE hInstance;
-PLUGINLINK* pluginLink;
HANDLE g_hNetlibUser;
@@ -66,7 +65,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinst,DWORD /*fdwReason*/,LPVOID /*lpvR //=====================================================
// Name : Load
-// Parameters: PLUGINLINK *link
+// Parameters:
// Returns : int
// Description : Called when plugin is loaded into Miranda
//=====================================================
@@ -95,13 +94,8 @@ static int yahooProtoUninit( CYahooProto* ppro ) return 0;
}
-extern "C" int __declspec(dllexport)Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport)Load(void)
{
- pluginLink = link;
-
- /**
- * Grab the interface handles (through pluginLink)
- */
mir_getLP( &pluginInfo );
PROTOCOLDESCRIPTOR pd = { 0 };
diff --git a/protocols/Yahoo/yahoo.h b/protocols/Yahoo/yahoo.h index 552f40cc46..efe3b9cf2f 100644 --- a/protocols/Yahoo/yahoo.h +++ b/protocols/Yahoo/yahoo.h @@ -15,11 +15,6 @@ #define MIRANDA_VER 0x0A00
-extern "C"
-{
- extern struct tagPLUGINLINK* pluginLink;
-};
-
#ifdef _MSC_VER
#define snprintf _snprintf
#endif
|