Fix handling of pmkContext in CreateURLMoniker.
This commit is contained in:
parent
9111d07db7
commit
608bdc6025
|
@ -1255,11 +1255,12 @@ HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
if(pmkContext) {
|
if(pmkContext) {
|
||||||
CLSID clsid;
|
|
||||||
IBindCtx* bind;
|
IBindCtx* bind;
|
||||||
IMoniker_GetClassID(pmkContext, &clsid);
|
DWORD dwMksys = 0;
|
||||||
if(IsEqualCLSID(&clsid, &CLSID_StdURLMoniker) && SUCCEEDED(CreateBindCtx(0, &bind))) {
|
IMoniker_IsSystemMoniker(pmkContext, &dwMksys);
|
||||||
URLMonikerImpl_GetDisplayName(pmkContext, bind, NULL, &lefturl);
|
if(dwMksys == MKSYS_URLMONIKER && SUCCEEDED(CreateBindCtx(0, &bind))) {
|
||||||
|
IMoniker_GetDisplayName(pmkContext, bind, NULL, &lefturl);
|
||||||
|
TRACE("lefturl = %s\n", debugstr_w(lefturl));
|
||||||
IBindCtx_Release(bind);
|
IBindCtx_Release(bind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue