ole32: Fix a failed call to DllGetClassObject while retrieving class object interface pointer.

Huang, Zhangrong hzhrong at gmail.com
Thu Dec 20 08:53:44 CST 2007


See dlls/ole32/compobj.c,

static HRESULT apartment_getclassobject(struct apartment *apt, LPCWSTR dllpath,
                                        BOOL apartment_threaded,
                                        REFCLSID rclsid, REFIID riid,
void **ppv)
{
...................
    if (SUCCEEDED(hr))
    {
..................
        TRACE("calling DllGetClassObject %p\n",
apartment_loaded_dll->dll->DllGetClassObject);
        /* OK: get the ClassObject */
        hr = apartment_loaded_dll->dll->DllGetClassObject(rclsid, riid, ppv);
                                                                  ^^^^
        if (hr != S_OK)
            ERR("DllGetClassObject returned error 0x%08x\n", hr);
    }
..............
}

Reference to http://msdn2.microsoft.com/en-us/library/ms680760.aspx,

riid

    [in] Reference to the identifier of the interface that the caller
    is to use to communicate with the class object. Usually, this is
    IID_IClassFactory (defined in the OLE headers as the interface
    identifier for IClassFactory).

We can't pass riid to DllGetClassObject directly sometimes, causes some dlls'
DllGetClassObject (like native adsldp.dll) can only return reference-counted
pointer to class factory via IID_IClassFactory, for retrieving the
pointer to the
class object interface requested in riid, we must try another way.

ChangeLog:
    ole32: Fix a failed call to DllGetClassObject while retrieving
class object interface pointer.


-- 
$ apt-get moo
         (__)
         (oo)
   /------\/
  / |    ||
 *  /\---/\
    ~~   ~~
...."Have you mooed today?"...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ole32-Fix-a-failed-call-to-DllGetClassObject-while.patch
Type: text/x-patch
Size: 1492 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071220/94190245/attachment.bin 


More information about the wine-patches mailing list