diff Plugins/Engine/SharedLibrary.h @ 893:f57802f8b4dc plugins

plugins for windows
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 16 Jun 2014 16:14:56 +0200
parents 4066e6f2d134
children 6e7e5ed91c2d
line wrap: on
line diff
--- a/Plugins/Engine/SharedLibrary.h	Mon Jun 16 15:41:13 2014 +0200
+++ b/Plugins/Engine/SharedLibrary.h	Mon Jun 16 16:14:56 2014 +0200
@@ -40,11 +40,18 @@
 {
   class SharedLibrary : boost::noncopyable
   {
+  public:
+#if defined(_WIN32)
+    typedef FARPROC FunctionPointer;
+#else
+    typedef void* FunctionPointer;
+#endif
+
   private:
     std::string path_;
     void *handle_;
 
-    void* GetFunctionInternal(const std::string& name);
+    FunctionPointer GetFunctionInternal(const std::string& name);
 
   public:
     SharedLibrary(const std::string& path);
@@ -58,6 +65,6 @@
 
     bool HasFunction(const std::string& name);
 
-    void* GetFunction(const std::string& name);
+    FunctionPointer GetFunction(const std::string& name);
   };
 }