Commit c1abc5a8 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32: Fix bind speed used in ParseDisplayName() for item moniker.

parent a456e8ff
......@@ -771,45 +771,35 @@ static HRESULT WINAPI ItemMonikerImpl_GetDisplayName(IMoniker* iface,
/******************************************************************************
* ItemMoniker_ParseDisplayName
******************************************************************************/
static HRESULT WINAPI ItemMonikerImpl_ParseDisplayName(IMoniker* iface,
IBindCtx* pbc,
IMoniker* pmkToLeft,
LPOLESTR pszDisplayName,
ULONG* pchEaten,
IMoniker** ppmkOut)
static HRESULT WINAPI ItemMonikerImpl_ParseDisplayName(IMoniker *iface, IBindCtx *pbc, IMoniker *pmkToLeft,
LPOLESTR displayname, ULONG *eaten, IMoniker **ppmkOut)
{
ItemMonikerImpl *This = impl_from_IMoniker(iface);
IOleItemContainer* poic=0;
IParseDisplayName* ppdn=0;
IOleItemContainer *container;
IParseDisplayName *parser;
LPOLESTR displayName;
HRESULT res;
TRACE("%s\n", debugstr_w(pszDisplayName));
HRESULT hr;
/* If pmkToLeft is NULL, this method returns MK_E_SYNTAX */
if (pmkToLeft==NULL)
TRACE("%p, %p, %p, %s, %p, %p.\n", iface, pbc, pmkToLeft, debugstr_w(displayname), eaten, ppmkOut);
if (!pmkToLeft)
return MK_E_SYNTAX;
else{
/* Otherwise, the method calls IMoniker::BindToObject on the pmkToLeft parameter, requesting an */
/* IParseDisplayName interface pointer to the object identified by the moniker, and passes the display */
/* name to IParseDisplayName::ParseDisplayName */
res=IMoniker_BindToObject(pmkToLeft,pbc,NULL,&IID_IOleItemContainer,(void**)&poic);
if (SUCCEEDED(res)){
res=IOleItemContainer_GetObject(poic,This->itemName,BINDSPEED_MODERATE,pbc,&IID_IParseDisplayName,(void**)&ppdn);
hr = IMoniker_BindToObject(pmkToLeft, pbc, NULL, &IID_IOleItemContainer, (void **)&container);
if (SUCCEEDED(hr))
{
hr = IOleItemContainer_GetObject(container, This->itemName, get_bind_speed_from_bindctx(pbc), pbc,
&IID_IParseDisplayName, (void **)&parser);
res=IMoniker_GetDisplayName(iface,pbc,NULL,&displayName);
hr = IMoniker_GetDisplayName(iface,pbc,NULL,&displayName);
res=IParseDisplayName_ParseDisplayName(ppdn,pbc,displayName,pchEaten,ppmkOut);
hr = IParseDisplayName_ParseDisplayName(parser, pbc, displayName, eaten, ppmkOut);
IOleItemContainer_Release(poic);
IParseDisplayName_Release(ppdn);
}
IOleItemContainer_Release(container);
IParseDisplayName_Release(parser);
}
return res;
return 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