ole32: Read the class id from the top-level storage object.
The cache_entries' storages are just references to the same object anyway.
This commit is contained in:
parent
366ed5495c
commit
c5e020c5b5
|
@ -1182,32 +1182,26 @@ static ULONG WINAPI DataCache_IPersistStorage_Release(
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* DataCache_GetClassID (IPersistStorage)
|
* DataCache_GetClassID (IPersistStorage)
|
||||||
*
|
*
|
||||||
* The data cache doesn't implement this method.
|
|
||||||
*/
|
*/
|
||||||
static HRESULT WINAPI DataCache_GetClassID(
|
static HRESULT WINAPI DataCache_GetClassID(IPersistStorage *iface, CLSID *clsid)
|
||||||
IPersistStorage* iface,
|
|
||||||
CLSID* pClassID)
|
|
||||||
{
|
{
|
||||||
DataCache *This = impl_from_IPersistStorage( iface );
|
DataCache *This = impl_from_IPersistStorage( iface );
|
||||||
DataCacheEntry *cache_entry;
|
HRESULT hr;
|
||||||
|
|
||||||
TRACE("(%p, %p)\n", iface, pClassID);
|
|
||||||
|
|
||||||
LIST_FOR_EACH_ENTRY(cache_entry, &This->cache_list, DataCacheEntry, entry)
|
|
||||||
{
|
|
||||||
if (cache_entry->storage != NULL)
|
|
||||||
{
|
|
||||||
STATSTG statstg;
|
STATSTG statstg;
|
||||||
HRESULT hr = IStorage_Stat(cache_entry->storage, &statstg, STATFLAG_NONAME);
|
|
||||||
|
TRACE( "(%p, %p)\n", iface, clsid );
|
||||||
|
|
||||||
|
if (This->presentationStorage)
|
||||||
|
{
|
||||||
|
hr = IStorage_Stat( This->presentationStorage, &statstg, STATFLAG_NONAME );
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
{
|
||||||
*pClassID = statstg.clsid;
|
*clsid = statstg.clsid;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
*pClassID = CLSID_NULL;
|
*clsid = CLSID_NULL;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue