]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
winverbs: use export/import function appropriately
authorSean Hefty <sean.hefty@intel.com>
Thu, 9 Sep 2010 16:58:48 +0000 (16:58 +0000)
committerSean Hefty <sean.hefty@intel.com>
Thu, 9 Sep 2010 16:58:48 +0000 (16:58 +0000)
Winverbs defines WvGetObject that users must invoke to obtain the winverb provider interface.  WvGetObject is defined in the header files as dllexport, but callers require dllimport.  The winverbs sources file already defines EXPORT_WV_SYMBOLS that is intended to distinguish if we are really trying to export or import WvGetObject. Update winverbs.h to support dllimport for clients including
winverbs directly.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1@2905 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/inc/user/rdma/winverbs.h

index 933fe7a30dd5f2ec00e24d29602e63b46414d0b3..fefef84331c4200b05c09b81838577000cbb7127 100644 (file)
@@ -1542,10 +1542,20 @@ DECLARE_INTERFACE_(IWVProvider, IUnknown)
                ) PURE;\r
 };\r
 \r
-#ifdef __cplusplus\r
-extern "C" __declspec(dllexport) HRESULT WvGetObject(REFIID riid, LPVOID FAR* ppvObj);\r
+#ifdef EXPORT_WV_SYMBOLS\r
+#define WV_EXPORT __declspec(dllexport)\r
 #else\r
-__declspec(dllexport) HRESULT WvGetObject(REFIID riid, LPVOID FAR* ppvObj);\r
+#define WV_EXPORT __declspec(dllimport)\r
+#endif\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+WV_EXPORT HRESULT WvGetObject(REFIID riid, LPVOID FAR* ppvObj);\r
+\r
+#ifdef __cplusplus\r
+}\r
 #endif\r
 \r
 #endif // _WINVERBS_H_\r