diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-03 14:21:59 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2010-08-03 14:21:59 +0300 |
commit | 03951c212bc3054a6b89a9fff9a125bace52224d (patch) | |
tree | e32e6238bd046a048bee70fea6b8a390e05558a1 | |
parent | 9a44caeb992e365d747fa9f6900310f72785836a (diff) |
modified: core/Makefile
modified: core/main.cpp
modified: modules/example/Makefile
modified: modules/example/main.cpp
-rw-r--r-- | core/Makefile | 2 | ||||
-rw-r--r-- | core/main.cpp | 10 | ||||
-rw-r--r-- | modules/example/Makefile | 2 | ||||
-rw-r--r-- | modules/example/main.cpp | 1 |
4 files changed, 2 insertions, 13 deletions
diff --git a/core/Makefile b/core/Makefile index 398e0dc..1613c29 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1,6 +1,6 @@ CFLAGS=-g -mwindows -mwin32 -D DEBUG -I../api/ -CXXFLAGS=${CFLAGS} LDFLAGS=-static-libgcc -Wl,--subsystem=windows +CXXFLAGS=${CFLAGS} CPPFLAGS = CC=i686-pc-mingw32-gcc CXX=i686-pc-mingw32-g++ diff --git a/core/main.cpp b/core/main.cpp index aa6a7fc..b5ff8e4 100644 --- a/core/main.cpp +++ b/core/main.cpp @@ -18,7 +18,6 @@ INT_PTR CallService(const char *name, WPARAM w, LPARAM l); HANDLE CreateServiceFunction(const char *name, SERVICE pService); DWORD WINAPI OnModulesLoadedThread( LPVOID lpParam ); int ServiceExists(const char *name); -SERVICE GetPluginInfoList(WPARAM, LPARAM); SERVICE Test(WPARAM, LPARAM); PLUGINLINK link = {&CreateServiceFunction, &CallService, &ServiceExists}; @@ -31,14 +30,12 @@ int main(int argc, char *argv[]) { (*p)->getFuncs().load(&link); } - CreateServiceFunction("GetPluginInfoList", (SERVICE)GetPluginInfoList); CreateServiceFunction("Test", (SERVICE)Test); for(list<plugin*>::iterator p = plugins.begin(); p != plugins.end(); p++) { if((*p)->getFuncs().loaded) { CreateThread(NULL, 0, OnModulesLoadedThread, (LPVOID)(*p)->getFuncs().loaded, 0, 0); -// (*p)->getFuncs().loaded(); } } CallService("GetPluginInfoList", 0, 0); @@ -160,13 +157,6 @@ int ServiceExists(const char *name) return 1; return 0; } -SERVICE GetPluginInfoList(WPARAM, LPARAM) -{ - list<PLUGININFO> *pluginInfoList = new list<PLUGININFO>; - for(list<plugin*>::iterator p = plugins.begin(); p != plugins.end(); p++) - pluginInfoList->push_back((*p)->getPluginInfo()); - return (SERVICE)pluginInfoList; //is it right ? -} SERVICE Test(WPARAM, LPARAM) { diff --git a/modules/example/Makefile b/modules/example/Makefile index 451583e..3686d9c 100644 --- a/modules/example/Makefile +++ b/modules/example/Makefile @@ -1,6 +1,6 @@ CFLAGS=-g -mdll -mwindows -I../../api/ -D DEBUG CXXFLAGS=${CFLAGS} -LDFLAGS=-Wl,-O1 -shared -static-libgcc +LDFLAGS=-static-libgcc -Wl,-O1 -shared CPPFLAGS = CC=i686-pc-mingw32-gcc CXX=i686-pc-mingw32-g++ diff --git a/modules/example/main.cpp b/modules/example/main.cpp index 2e15520..647654e 100644 --- a/modules/example/main.cpp +++ b/modules/example/main.cpp @@ -40,6 +40,5 @@ extern "C" int __declspec(dllexport) OnModulesLoaded() //load main code from her { MessageBoxA(0, "Advanced plugin features needed services from other plugins are working from now", "INFO", MB_OK); CallService("Test", 0, 0); //usage example of service registered in core - std::list<PLUGININFO> *pluglist = (std::list<PLUGININFO>*)CallService("GetPluginInfoList", 0, 0); //get list with info for all plugins return 0; } |