hhctrl: Add the WebBrowser implementation
Dmitry Timoshkov
dmitry at baikal.ru
Wed Jul 27 03:29:51 CDT 2005
"James Hawkins" <truiken at gmail.com> wrote:
> +#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
IMO using 'const' before the type looks more natural. Also adding 'const'
to all type conversions wouldn't hurt:
const impl* This = (const impl*)((const char*)(iface) - offsetof(impl,field))
> +static HRESULT STDMETHODCALLTYPE Site_SaveObject(IOleClientSite *iface)
> +{
> + return E_NOTIMPL;
> +}
Any chance to add a FIXME to all not implemented interfaces even if you return
S_OK in them?
> +static IOleClientSiteVtbl MyIOleClientSiteTable =
Please make all OLE vtables const and use const keyword for pointers
to them in the structures of interface implementations.
> + switch (dwAction)
> + {
> + case WB_GOBACK:
> + IWebBrowser2_GoBack(pWebBrowser2);
> + break;
> + case WB_GOFORWARD:
> + IWebBrowser2_GoForward(pWebBrowser2);
> + break;
> + case WB_GOHOME:
> + IWebBrowser2_GoHome(pWebBrowser2);
> + break;
> + case WB_SEARCH:
> + IWebBrowser2_GoSearch(pWebBrowser2);
> + break;
> + case WB_REFRESH:
> + IWebBrowser2_Refresh(pWebBrowser2);
If it's intented to not use 'break;' here a comment telling that wouldn't
hurt.
> + case WB_STOP:
> + IWebBrowser2_Stop(pWebBrowser2);
> + }
default: here wouldn't hurt as well and would show some not expected/implemented
cases with a FIXME message.
--
Dmitry.
More information about the wine-devel
mailing list