diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-01 19:30:02 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-01 19:30:02 +0300 |
commit | 4384e3d393f4ece218f401864b4edfaa0545f123 (patch) | |
tree | ed957a60603747ee18d68783b9a6c0ee33aee333 /modules/example | |
parent | d83d23b9a9df04386966452f7b84d84b01dbb3fb (diff) |
modified: Makefile
modified: main.cpp
modified: ../modules/example/main.cpp
Diffstat (limited to 'modules/example')
-rw-r--r-- | modules/example/main.cpp | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/modules/example/main.cpp b/modules/example/main.cpp index e778c9c..a4c0ee6 100644 --- a/modules/example/main.cpp +++ b/modules/example/main.cpp @@ -1,13 +1,34 @@ #include <windows.h> #include <api.h> #include <pluginapi.h> +#include <iostream> -HINSTANCE hDllInstance=NULL; -BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) //default dll entry point +HINSTANCE hInst; +BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved ) //default dll entry point { - if (ul_reason_for_call == DLL_PROCESS_ATTACH) - hDllInstance = (HINSTANCE)hModule; + hInst = hinstDLL; return TRUE; } - +PLUGININFO pluginInfo = +{ + sizeof(PLUGININFO), //size of structure + (char*)"example plugin", //short name + 0, //description + 0, //author + 0, //author email + PLUGIN_MAKE_VERSION(0,0,0,1), //version + 0 //flags (unused) +}; + +extern "C" __declspec(dllexport) PLUGININFO* SetPluginInfo() +{ + return &pluginInfo; +} + +extern "C" int __declspec(dllexport) Load() +{ + std::cout<<"core run every code in this function.\n"; + return 0; //all ok, retrun 0 +} + |