summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-10-15 15:42:17 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-10-15 15:42:17 +0300
commitbbd478c3b43fa756f1bfd54f1e989c832c2ca9d3 (patch)
tree561b2a5064295bdfe0a7169e7c8df3f365f81cd5
parent73d74fd020eb11a21fd963e96c4034aadec14979 (diff)
modified: plugins/example/main.cpp
-rw-r--r--plugins/example/main.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/plugins/example/main.cpp b/plugins/example/main.cpp
index 8c51548..9df4c81 100644
--- a/plugins/example/main.cpp
+++ b/plugins/example/main.cpp
@@ -39,19 +39,31 @@ PLUGININFO pluginInfo =
0x00010101 //version 0.1.1.1
};
+#ifdef _WIN32
+extern "C" __declspec(dllexport) PLUGININFO* set_plugin_info()
+#else
extern "C" PLUGININFO* set_plugin_info()
+#endif
{
return &pluginInfo; //necessary, our plugin info for core can recognize us
}
-extern "C" int load(PLUGINLINK *link) //basic initialisation, registering new functions, do other basic initialisation, you can create infinite loop, or other code which use many time here, only fast basic initialisation
+#ifdef _WIN32
+extern "C" __declspec(dllexport) int load(PLUGINLINK *link) //basic initialisation, registering new functions, do other basic initialisation, you can create infinite loop, or other code which use many time here, only fast basic initialisation
+#else
+extern "C" int load(PLUGINLINK *link)
+#endif
{
pluginLink = link; //necessary
//some basic initialisation code
return 0; //all ok, retrun 0
}
+#ifdef _WIN32
+extern "C" __declspec(dllexport) int on_modules_loaded() //load main code from here, all services from other plugins must be avaible here
+#else
extern "C" int on_modules_loaded() //load main code from here, all services from other plugins must be avaible here
+#endif
{
wxApp::SetInstance(new wxPluginForEvilCore()); //create instance, i think here is right place, not in load where we do only basic initialisation
#ifdef _WIN32
@@ -68,7 +80,11 @@ extern "C" int on_modules_loaded() //load main code from here, all services from
return 0;
}
+#ifdef _win32
+extern "C" __declspec(dllexport) int unload()
+#else
extern "C" int unload()
+#endif
{
//do some cleanup on exit
wxEntryCleanup(); //call it before, or after other cleanup