summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/api.h20
-rw-r--r--core/main.cpp4
-rw-r--r--modules/example/main.cpp23
3 files changed, 2 insertions, 45 deletions
diff --git a/api/api.h b/api/api.h
index 8fba13c..441f258 100644
--- a/api/api.h
+++ b/api/api.h
@@ -1,24 +1,4 @@
#ifndef API_H
#define API_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct PluginInfo
-{
-// DWORD dwPluginType; //unused for now
- char *szPluginName;
-};
-
-struct HostInfo
-{
- DWORD dwVersion;
-};
-
-__declspec(dllexport) void GetPluginInfo(PluginInfo* pPluginInfo, DWORD *pdwResult);
-__declspec(dllexport) void PluginHandler(DWORD dwCode, HostInfo *pHostInfo, DWORD *pdwResult);
-#ifdef __cplusplus
-}
-#endif
#endif //API_H
diff --git a/core/main.cpp b/core/main.cpp
index 5bb4925..9c42aaa 100644
--- a/core/main.cpp
+++ b/core/main.cpp
@@ -1,11 +1,9 @@
#include <windows.h>
#include <api.h>
+#include <pluginapi.h>
-typedef void (*GetPluginInfoType)(PluginInfo*);
-typedef void (*PluginHandlerType)(HostInfo*);
int main()
{
-
return 0;
}
diff --git a/modules/example/main.cpp b/modules/example/main.cpp
index 7194f72..e778c9c 100644
--- a/modules/example/main.cpp
+++ b/modules/example/main.cpp
@@ -1,5 +1,6 @@
#include <windows.h>
#include <api.h>
+#include <pluginapi.h>
HINSTANCE hDllInstance=NULL;
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) //default dll entry point
@@ -9,26 +10,4 @@ BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
return TRUE;
}
-void GetPluginInfo(PluginInfo* pPluginInfo, DWORD *pdwResult)
-{
- pPluginInfo->szPluginName = (char*)"Simple Plugin example";
- *pdwResult=0;
-}
-
-void PluginHandler(DWORD dwCode,HostInfo *pHostInfo,DWORD *pdwResult)
-{
- switch(dwCode)
- {
- case 1:
- //первое действие
- *pdwResult=1;
- break;
- case 2:
- //второе действие
- *pdwResult=1;
- break;
- default:
- *pdwResult=0;
- }
-}