dsound: Implement QueryInterface for the class factory objects.

Robert Shearman rob at codeweavers.com
Sun Apr 29 11:44:36 CDT 2007


---
  dlls/dsound/dsound_main.c |   10 +++++++++-
  1 files changed, 9 insertions(+), 1 deletions(-)
-------------- next part --------------
diff --git a/dlls/dsound/dsound_main.c b/dlls/dsound/dsound_main.c
index 94d2122..1736fe3 100644
--- a/dlls/dsound/dsound_main.c
+++ b/dlls/dsound/dsound_main.c
@@ -439,9 +439,17 @@ static HRESULT WINAPI
 DSCF_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppobj)
 {
     IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
-    FIXME("(%p, %s, %p) stub!\n", This, debugstr_guid(riid), ppobj);
+    TRACE("(%p, %s, %p)\n", This, debugstr_guid(riid), ppobj);
     if (ppobj == NULL)
         return E_POINTER;
+    if (IsEqualIID(riid, &IID_IUnknown) ||
+        IsEqualIID(riid, &IID_IClassFactory))
+    {
+        *ppobj = iface;
+        IUnknown_AddRef(iface);
+        return S_OK;
+    }
+    *ppobj = NULL;
     return E_NOINTERFACE;
 }
 


More information about the wine-patches mailing list