Commit 608bdc60 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

Fix handling of pmkContext in CreateURLMoniker.

parent 9111d07d
......@@ -1255,11 +1255,12 @@ HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **
return E_OUTOFMEMORY;
if(pmkContext) {
CLSID clsid;
IBindCtx* bind;
IMoniker_GetClassID(pmkContext, &clsid);
if(IsEqualCLSID(&clsid, &CLSID_StdURLMoniker) && SUCCEEDED(CreateBindCtx(0, &bind))) {
URLMonikerImpl_GetDisplayName(pmkContext, bind, NULL, &lefturl);
DWORD dwMksys = 0;
IMoniker_IsSystemMoniker(pmkContext, &dwMksys);
if(dwMksys == MKSYS_URLMONIKER && SUCCEEDED(CreateBindCtx(0, &bind))) {
IMoniker_GetDisplayName(pmkContext, bind, NULL, &lefturl);
TRACE("lefturl = %s\n", debugstr_w(lefturl));
IBindCtx_Release(bind);
}
}
......
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