diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-01 15:22:07 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-01 15:22:07 +0300 |
commit | b36bf78a9dc63d9181991d1342dcd91520951a28 (patch) | |
tree | a441042cbb2e90b7fb5f3232de83d616e0e751dc | |
parent | ebcf5ee1991c4815eb31674653e7d2e9036ab760 (diff) |
modified: api/api.h
modified: core/main.cpp
modified: modules/example/main.cpp
-rw-r--r-- | api/api.h | 20 | ||||
-rw-r--r-- | core/main.cpp | 4 | ||||
-rw-r--r-- | modules/example/main.cpp | 23 |
3 files changed, 2 insertions, 45 deletions
@@ -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; - } -} |