summaryrefslogtreecommitdiff
path: root/protocols/Steam
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Steam')
-rw-r--r--protocols/Steam/src/main.cpp16
-rw-r--r--protocols/Steam/src/stdafx.h1
-rw-r--r--protocols/Steam/src/steam_options.cpp2
-rw-r--r--protocols/Steam/src/steam_proto.cpp2
4 files changed, 14 insertions, 7 deletions
diff --git a/protocols/Steam/src/main.cpp b/protocols/Steam/src/main.cpp
index f674bc4a09..2bf3ee3bdc 100644
--- a/protocols/Steam/src/main.cpp
+++ b/protocols/Steam/src/main.cpp
@@ -1,8 +1,6 @@
#include "stdafx.h"
int hLangpack;
-HINSTANCE g_hInstance;
-CMPlugin g_plugin;
HANDLE hExtraXStatus;
@@ -20,15 +18,23 @@ PLUGININFOEX pluginInfo =
{ 0x68f5a030, 0xba32, 0x48ec, { 0x95, 0x7, 0x5c, 0x2f, 0xbd, 0xea, 0x52, 0x17 }}
};
-extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
-
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
{
return &pluginInfo;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
+CMPlugin g_plugin;
+
+extern "C" _pfnCrtInit _pRawDllMain = &CMPlugin::RawDllMain;
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Load(void)
{
mir_getLP(&pluginInfo);
@@ -44,6 +50,8 @@ extern "C" int __declspec(dllexport) Load(void)
return 0;
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
diff --git a/protocols/Steam/src/stdafx.h b/protocols/Steam/src/stdafx.h
index 744cbb7f6d..4a70cb0159 100644
--- a/protocols/Steam/src/stdafx.h
+++ b/protocols/Steam/src/stdafx.h
@@ -49,7 +49,6 @@
#define STEAM_API_POLLING_ERRORS_LIMIT 5
class CSteamProto;
-extern HINSTANCE g_hInstance;
extern HANDLE hExtraXStatus;
diff --git a/protocols/Steam/src/steam_options.cpp b/protocols/Steam/src/steam_options.cpp
index 21ecd18828..ed5fc00e36 100644
--- a/protocols/Steam/src/steam_options.cpp
+++ b/protocols/Steam/src/steam_options.cpp
@@ -76,7 +76,7 @@ void CSteamOptionsBlockList::OnBlock(CCtrlButton*)
int CSteamProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = g_hInstance;
+ odp.hInstance = g_plugin.getInst();
odp.szTitle.w = m_tszUserName;
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.szGroup.w = LPGENW("Network");
diff --git a/protocols/Steam/src/steam_proto.cpp b/protocols/Steam/src/steam_proto.cpp
index fde2920507..6ca91ace53 100644
--- a/protocols/Steam/src/steam_proto.cpp
+++ b/protocols/Steam/src/steam_proto.cpp
@@ -19,7 +19,7 @@ CSteamProto::CSteamProto(const char* protoName, const wchar_t* userName)
// icons
wchar_t filePath[MAX_PATH];
- GetModuleFileName(g_hInstance, filePath, MAX_PATH);
+ GetModuleFileName(g_plugin.getInst(), filePath, MAX_PATH);
wchar_t sectionName[100];
mir_snwprintf(sectionName, L"%s/%s", LPGENW("Protocols"), _A2W(MODULE));