summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/delphi/m_api.pas11
-rw-r--r--include/newpluginapi.h4
-rw-r--r--src/mir_app/src/CMPluginBase.cpp4
3 files changed, 14 insertions, 5 deletions
diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas
index 5500263fca..6237eaaa56 100644
--- a/include/delphi/m_api.pas
+++ b/include/delphi/m_api.pas
@@ -142,13 +142,19 @@ type
type
PCMPlugin = ^CMPlugin;
- CMPlugin = record
+ CMPlugin = packed record
vft : pointer; // virtual function table
+
m_hInst : THANDLE;
m_szModule : PAnsiChar;
m_pInfo : PPLUGININFOEX;
m_hLogger : THANDLE;
- m_hLang : int;
+
+ blabla1 : pointer; // emulator of icon's list
+ blabla2 : integer;
+ blabla3 : integer;
+ blabla4 : integer;
+ blabla5 : pointer;
end;
//----- Fork enchancement -----
@@ -252,6 +258,7 @@ implementation
initialization
g_plugin.m_hInst := hInstance;
g_plugin.m_pInfo := @PluginInfo;
+ g_plugin.blabla4 := 10;
RegisterPlugin(g_plugin);
finalization
diff --git a/include/newpluginapi.h b/include/newpluginapi.h
index 69fa059881..30f7abff60 100644
--- a/include/newpluginapi.h
+++ b/include/newpluginapi.h
@@ -151,6 +151,8 @@ typedef int(*pfnUninitProto)(PROTO_INTERFACE*);
#pragma warning(push)
#pragma warning(disable:4275)
+struct IcolibItem;
+
class MIR_APP_EXPORT CMPluginBase : public MNonCopyable
{
void tryOpenLog();
@@ -160,7 +162,7 @@ protected:
const char *m_szModuleName;
const PLUGININFOEX &m_pInfo;
HANDLE m_hLogger = nullptr;
- LIST<void> m_arIcons;
+ LIST<IcolibItem> m_arIcons;
CMPluginBase(const char *moduleName, const PLUGININFOEX &pInfo);
~CMPluginBase();
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp
index 17b72e227f..ceb91f4f29 100644
--- a/src/mir_app/src/CMPluginBase.cpp
+++ b/src/mir_app/src/CMPluginBase.cpp
@@ -112,9 +112,9 @@ EXTERN_C MIR_APP_DLL(void) UnregisterPlugin(CMPluginBase *pPlugin)
/////////////////////////////////////////////////////////////////////////////////////////
-static int CompareIcons(const void *p1, const void *p2)
+static int CompareIcons(const IcolibItem *p1, const IcolibItem *p2)
{
- return ((IcolibItem*)p1)->default_indx - ((IcolibItem*)p2)->default_indx;
+ return p1->default_indx - p2->default_indx;
}
CMPluginBase::CMPluginBase(const char *moduleName, const PLUGININFOEX &pInfo) :