hlink: Always pass a bind context to IMoniker::GetDisplayName.

This commit is contained in:
Andrew Eikum 2012-02-03 13:15:27 -06:00 committed by Alexandre Julliard
parent 2a0de94844
commit 8fa2b2d256
1 changed files with 4 additions and 1 deletions

View File

@ -217,9 +217,12 @@ static HRESULT WINAPI IHlink_fnSetMonikerReference( IHlink* iface,
This->Moniker = pmkTarget;
if (This->Moniker)
{
IBindCtx *pbc;
LPOLESTR display_name;
IMoniker_AddRef(This->Moniker);
IMoniker_GetDisplayName(This->Moniker, NULL, NULL, &display_name);
CreateBindCtx( 0, &pbc);
IMoniker_GetDisplayName(This->Moniker, pbc, NULL, &display_name);
IBindCtx_Release(pbc);
This->absolute = display_name && strchrW(display_name, ':');
CoTaskMemFree(display_name);
}