Robert Shearman : include: Add DLL registration macros to rpcproxy.
h for dlldata.c files.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Aug 9 16:18:43 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 891c83d976299f010794138e45c17fa6b15c578a
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=891c83d976299f010794138e45c17fa6b15c578a
Author: Robert Shearman <rob at codeweavers.com>
Date: Wed Aug 9 18:15:56 2006 +0100
include: Add DLL registration macros to rpcproxy.h for dlldata.c files.
---
include/rpcproxy.h | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/include/rpcproxy.h b/include/rpcproxy.h
index 824462a..a4adc02 100644
--- a/include/rpcproxy.h
+++ b/include/rpcproxy.h
@@ -303,7 +303,36 @@ #define DLLCANUNLOADNOW(factory) \
return NdrDllCanUnloadNow((factory)); \
}
-#define DLLREGISTRY_ROUTINES(pfl, factory_clsid)
+#define REGISTER_PROXY_DLL_ROUTINES(pfl, factory_clsid) \
+ HINSTANCE hProxyDll = NULL; \
+ \
+ BOOL WINAPI DLLMAIN_ENTRY(HINSTANCE hinstDLL, DWORD fdwReason, \
+ LPVOID lpvReserved) \
+ { \
+ if (fdwReason == DLL_PROCESS_ATTACH) \
+ { \
+ DisableThreadLibraryCalls(hinstDLL); \
+ hProxyDll = hinstDLL; \
+ } \
+ return TRUE; \
+ } \
+ \
+ HRESULT WINAPI DLLREGISTERSERVER_ENTRY(void) \
+ { \
+ return NdrDllRegisterProxy(hProxyDll, (pfl), (factory_clsid)); \
+ } \
+ \
+ HRESULT WINAPI DLLUNREGISTERSERVER_ENTRY(void) \
+ { \
+ return NdrDllUnregisterProxy(hProxyDll, (pfl), (factory_clsid)); \
+ }
+
+#ifdef REGISTER_PROXY_DLL
+# define DLLREGISTRY_ROUTINES(pfl, factory_clsid) \
+ REGISTER_PROXY_DLL_ROUTINES(pfl, factory_clsid)
+#else
+# define DLLREGISTRY_ROUTINES(pfl, factory_clsid)
+#endif
#define DLLDATA_ROUTINES(pfl, factory_clsid) \
CLSID_PSFACTORYBUFFER \
More information about the wine-cvs
mailing list