Commit 9645f9d1 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

ole32: get_moniker_for_progid_display_name should fallback to using…

ole32: get_moniker_for_progid_display_name should fallback to using IClassFactory to get IParseDisplayName if getting it directly fails.
parent ebac63e1
...@@ -1086,6 +1086,21 @@ static HRESULT get_moniker_for_progid_display_name(LPBC pbc, ...@@ -1086,6 +1086,21 @@ static HRESULT get_moniker_for_progid_display_name(LPBC pbc,
IParseDisplayName *pdn; IParseDisplayName *pdn;
hr = IMoniker_BindToObject(class_moniker, pbc, NULL, hr = IMoniker_BindToObject(class_moniker, pbc, NULL,
&IID_IParseDisplayName, (void **)&pdn); &IID_IParseDisplayName, (void **)&pdn);
/* fallback to using IClassFactory to get IParseDisplayName -
* adsldp.dll depends on this */
if (FAILED(hr))
{
IClassFactory *pcf;
hr = IMoniker_BindToObject(class_moniker, pbc, NULL,
&IID_IClassFactory, (void **)&pcf);
if (SUCCEEDED(hr))
{
hr = IClassFactory_CreateInstance(pcf, NULL,
&IID_IParseDisplayName,
(void **)&pdn);
IClassFactory_Release(pcf);
}
}
IMoniker_Release(class_moniker); IMoniker_Release(class_moniker);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment