From ebcf5ee1991c4815eb31674653e7d2e9036ab760 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Sun, 1 Aug 2010 14:49:28 +0300 Subject: modified: api/api.h new file: core/Makefile modified: core/main.cpp new file: modules/example/Makefile modified: modules/example/main.cpp --- modules/example/main.cpp | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'modules/example/main.cpp') diff --git a/modules/example/main.cpp b/modules/example/main.cpp index 3ba6fb5..7194f72 100644 --- a/modules/example/main.cpp +++ b/modules/example/main.cpp @@ -1,13 +1,34 @@ #include -#include "../api/api.h" +#include HINSTANCE hDllInstance=NULL; -BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, -LPVOID lpReserved ) +BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) //default dll entry point { if (ul_reason_for_call == DLL_PROCESS_ATTACH) hDllInstance = (HINSTANCE)hModule; 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; + } +} + -- cgit v1.2.3