From 01fefd636e8ce0466bd23223985ae378849f6551 Mon Sep 17 00:00:00 2001 From: Kevin Koltzau Date: Wed, 31 Mar 2004 19:58:09 +0000 Subject: [PATCH] Implemented IsEqual. --- dlls/urlmon/umon.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c index c482e1759b2..e25a986563b 100644 --- a/dlls/urlmon/umon.c +++ b/dlls/urlmon/umon.c @@ -643,9 +643,34 @@ static HRESULT WINAPI URLMonikerImpl_Enum(IMoniker* iface,BOOL fForward, IEnumMo static HRESULT WINAPI URLMonikerImpl_IsEqual(IMoniker* iface,IMoniker* pmkOtherMoniker) { ICOM_THIS(URLMonikerImpl,iface); - FIXME("(%p)->(%p): stub\n",This,pmkOtherMoniker); + CLSID clsid; + LPOLESTR urlPath; + IBindCtx* bind; + HRESULT res; - return E_NOTIMPL; + TRACE("(%p,%p)\n",This,pmkOtherMoniker); + + if(pmkOtherMoniker==NULL) + return E_INVALIDARG; + + IMoniker_GetClassID(pmkOtherMoniker,&clsid); + + if(!IsEqualCLSID(&clsid,&CLSID_StdURLMoniker)) + return S_FALSE; + + res = CreateBindCtx(0,&bind); + if(FAILED(res)) + return res; + + res = S_FALSE; + if(SUCCEEDED(IMoniker_GetDisplayName(pmkOtherMoniker,bind,NULL,&urlPath))) { + int result = lstrcmpiW(urlPath, This->URLName); + CoTaskMemFree(urlPath); + if(result == 0) + res = S_OK; + } + IUnknown_Release(bind); + return res; }