summaryrefslogtreecommitdiff
path: root/plugins/Import/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Import/main.cpp')
-rw-r--r--plugins/Import/main.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/Import/main.cpp b/plugins/Import/main.cpp
index 36589b486e..a80ae522bd 100644
--- a/plugins/Import/main.cpp
+++ b/plugins/Import/main.cpp
@@ -49,6 +49,8 @@ HINSTANCE hInst;
PLUGINLINK *pluginLink;
static HWND hwndWizard = NULL;
int hLangpack;
+struct MM_INTERFACE mmi;
+struct UTF8_INTERFACE utfi;
PLUGININFOEX pluginInfo = {
sizeof(PLUGININFOEX),
@@ -84,7 +86,7 @@ static INT_PTR ImportCommand(WPARAM wParam,LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// MirandaPluginInfoEx - returns an information about a plugin
-__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
return &pluginInfo;
}
@@ -94,7 +96,7 @@ __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
static const MUUID interfaces[] = {MIID_IMPORT, MIID_LAST};
-__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
{
return interfaces;
}
@@ -129,7 +131,7 @@ static int OnExit(WPARAM wParam, LPARAM lParam)
return 0;
}
-int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
{
pluginLink = link;
mir_getMMI( &mmi );
@@ -162,7 +164,7 @@ int __declspec(dllexport) Load(PLUGINLINK *link)
/////////////////////////////////////////////////////////////////////////////////////////
// Unload a plugin
-int __declspec(dllexport) Unload(void)
+extern "C" __declspec(dllexport) int Unload(void)
{
if (hHookModulesLoaded)
UnhookEvent(hHookModulesLoaded);
@@ -349,7 +351,7 @@ int CreateGroup(BYTE type, const char* name, HANDLE hContact)
return 0;
cbName = _tcslen(tmp);
- tszGrpName = _alloca(( cbName+2 )*sizeof( TCHAR ));
+ tszGrpName = (TCHAR*)_alloca(( cbName+2 )*sizeof( TCHAR ));
tszGrpName[0] = 1 | GROUPF_EXPANDED;
_tcscpy( tszGrpName+1, tmp );
mir_free( tmp );