[PATCH 1/3] qmgr: Added DllGetClassObject and DllCanUnloadNow.

Roy Shea roy at cs.hmc.edu
Sun Dec 9 15:11:24 CST 2007


Revision 2.  Made dll_ref static for now.
---
 dlls/qmgr/qmgr.spec   |    2 ++
 dlls/qmgr/qmgr_main.c |   16 ++++++++++++++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/dlls/qmgr/qmgr.spec b/dlls/qmgr/qmgr.spec
index 1a63b32..c534b4f 100644
--- a/dlls/qmgr/qmgr.spec
+++ b/dlls/qmgr/qmgr.spec
@@ -1,2 +1,4 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
 @ stub DllRegisterServer
 @ stub DllUnregisterServer
diff --git a/dlls/qmgr/qmgr_main.c b/dlls/qmgr/qmgr_main.c
index d00ac2d..ef10a32 100644
--- a/dlls/qmgr/qmgr_main.c
+++ b/dlls/qmgr/qmgr_main.c
@@ -30,6 +30,9 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(qmgr);
 
+/* Number of references to this DLL */
+static LONG dll_ref = 0;
+
 /* Entry point for DLL */
 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 {
@@ -48,3 +51,16 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 
     return TRUE;
 }
+
+/* Retreive class object from DLL */
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
+{
+    FIXME("Not implemented\n");
+    return E_NOTIMPL;
+}
+
+/* Check to see if the DLL can be unloaded */
+HRESULT WINAPI DllCanUnloadNow(void)
+{
+    return dll_ref != 0 ? S_FALSE : S_OK;
+}
-- 
1.5.3.1




More information about the wine-patches mailing list