[ofw] [PATCH] winverbs: use export/import functions appropriately

Hefty, Sean sean.hefty at intel.com
Thu Sep 2 12:17:30 PDT 2010


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 at intel.com>
---
Several other headers have a similar issue.  Just fixing winverbs
for now.

Index: winverbs.h
===================================================================
--- winverbs.h	(revision 2870)
+++ winverbs.h	(working copy)
@@ -1542,10 +1542,16 @@
 		) PURE;
 };
 
+#ifdef EXPORT_WV_SYMBOLS
+#define WV_EXPORT __declspec(dllexport)
+#else
+#define WV_EXPORT __declspec(dllimport)
+#endif
+
 #ifdef __cplusplus
-extern "C" __declspec(dllexport) HRESULT WvGetObject(REFIID riid, LPVOID FAR* ppvObj);
+extern "C" WV_EXPORT HRESULT WvGetObject(REFIID riid, LPVOID FAR* ppvObj);
 #else
-__declspec(dllexport) HRESULT WvGetObject(REFIID riid, LPVOID FAR* ppvObj);
+WV_EXPORT HRESULT WvGetObject(REFIID riid, LPVOID FAR* ppvObj);
 #endif
 
 #endif // _WINVERBS_H_




More information about the ofw mailing list