Jacek Caban : shdocvw: Added correct implementation of
IProvideClassInfo:: GetGUID.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Feb 21 05:04:34 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 0c12e2663b6964d1cfc44b5546800e42452aba3b
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0c12e2663b6964d1cfc44b5546800e42452aba3b
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Feb 21 10:05:00 2006 +0100
shdocvw: Added correct implementation of IProvideClassInfo::GetGUID.
---
dlls/shdocvw/classinfo.c | 29 +++++++++--------------------
1 files changed, 9 insertions(+), 20 deletions(-)
diff --git a/dlls/shdocvw/classinfo.c b/dlls/shdocvw/classinfo.c
index d6290af..455ec0b 100644
--- a/dlls/shdocvw/classinfo.c
+++ b/dlls/shdocvw/classinfo.c
@@ -60,34 +60,23 @@ static HRESULT WINAPI ProvideClassInfo_G
return E_NOTIMPL;
}
-/* Get the IID for generic default event callbacks. This IID will
- * in theory be used to later query for an IConnectionPoint to connect
- * an event sink (callback implementation in the OLE control site)
- * to this control.
-*/
static HRESULT WINAPI ProvideClassInfo_GetGUID(IProvideClassInfo2 *iface,
DWORD dwGuidKind, GUID *pGUID)
{
WebBrowser *This = CLASSINFO_THIS(iface);
- FIXME("(%p)->(%ld %p)\n", This, dwGuidKind, pGUID);
+ TRACE("(%p)->(%ld %p)\n", This, dwGuidKind, pGUID);
- if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID)
- {
- FIXME ("Requested unsupported GUID type: %ld\n", dwGuidKind);
- return E_FAIL; /* Is there a better return type here? */
- }
+ if(!pGUID)
+ return E_POINTER;
- /* FIXME: Returning IPropertyNotifySink interface, but should really
- * return a more generic event set (???) dispinterface.
- * However, this hack, allows a control site to return with success
- * (MFC's COleControlSite falls back to older IProvideClassInfo interface
- * if GetGUID() fails to return a non-NULL GUID).
- */
- memcpy(pGUID, &IID_IPropertyNotifySink, sizeof(GUID));
- FIXME("Wrongly returning IPropertyNotifySink interface %s\n",
- debugstr_guid(pGUID));
+ if (dwGuidKind != GUIDKIND_DEFAULT_SOURCE_DISP_IID) {
+ WARN("Wrong GUID type: %ld\n", dwGuidKind);
+ memcpy(pGUID, &IID_NULL, sizeof(GUID));
+ return E_FAIL;
+ }
+ memcpy(pGUID, &DIID_DWebBrowserEvents2, sizeof(GUID));
return S_OK;
}
More information about the wine-cvs
mailing list