Bernard Ladenthin : browseui: Implement ClassFactory_LockServer in browseui dll.

Alexandre Julliard julliard at wine.codeweavers.com
Mon May 7 09:10:31 CDT 2007


Module: wine
Branch: master
Commit: db07476c11e79e3ae06f44f6dd3b76bcaa79be05
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=db07476c11e79e3ae06f44f6dd3b76bcaa79be05

Author: Bernard Ladenthin <bernard at ladenthin.net>
Date:   Sun May  6 19:31:07 2007 +0200

browseui: Implement ClassFactory_LockServer in browseui dll.

---

 dlls/browseui/browseui.h      |    4 ++++
 dlls/browseui/browseui_main.c |   14 ++++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/dlls/browseui/browseui.h b/dlls/browseui/browseui.h
index 2f44ac7..f8ec194 100644
--- a/dlls/browseui/browseui.h
+++ b/dlls/browseui/browseui.h
@@ -23,6 +23,10 @@
 
 extern LONG BROWSEUI_refCount;
 
+extern LONG module_ref;
+#define LOCK_MODULE()   InterlockedIncrement(&module_ref)
+#define UNLOCK_MODULE() InterlockedDecrement(&module_ref)
+
 HRESULT WINAPI ACLMulti_Constructor(IUnknown *punkOuter, IUnknown **ppOut);
 
 #endif /* __WINE_SHDOCVW_H */
diff --git a/dlls/browseui/browseui_main.c b/dlls/browseui/browseui_main.c
index 2796554..c5f9cbe 100644
--- a/dlls/browseui/browseui_main.c
+++ b/dlls/browseui/browseui_main.c
@@ -43,6 +43,8 @@ LONG BROWSEUI_refCount = 0;
 
 HINSTANCE browseui_hinstance = 0;
 
+LONG module_ref = 0;
+
 typedef HRESULT (WINAPI *LPFNCONSTRUCTOR)(IUnknown *pUnkOuter, IUnknown **ppvOut);
 
 static const struct {
@@ -126,8 +128,16 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown
 
 static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
 {
-    FIXME("(%p, %s) - not implemented\n", iface, (fLock ? "TRUE" : "FALSE"));
-    return E_NOTIMPL;
+    ClassFactory *This = (ClassFactory *)iface;
+
+    TRACE("(%p)->(%x)\n", This, fLock);
+
+    if(fLock)
+        LOCK_MODULE();
+    else
+        UNLOCK_MODULE();
+
+    return S_OK;
 }
 
 static const IClassFactoryVtbl ClassFactoryVtbl = {




More information about the wine-cvs mailing list