mshtml: Add IHTMLEditServices stub implementation.

Jacek Caban jacek at codeweavers.com
Fri Oct 9 05:31:11 CDT 2015


Hi Dmitry,

Please add a test. A very simple one that just calls QueryService and
checks its return will be enough.

I can see that you used undo mgr as an example, but it has its problems
that I'd rather avoid in new code, so it would be nice to improve the patch.

On 10/09/15 05:53, Dmitry Timoshkov wrote:
> +static HRESULT WINAPI editsvcs_QueryInterface(IHTMLEditServices *iface, REFIID riid, void **ppv)
> +{
> +    editsvcs *This = impl_from_IHTMLEditServices(iface);
> +
> +    if(IsEqualGUID(riid, &IID_IUnknown)) {
> +        TRACE("(%p)->(IID_IUnknown %p)\n", This, ppv);
> +        *ppv = &This->IHTMLEditServices_iface;
> +    } else if(IsEqualGUID(riid, &IID_IHTMLEditServices)) {
> +        TRACE("(%p)->(IID_IHTMLEditServices %p)\n", This, ppv);
> +        *ppv = &This->IHTMLEditServices_iface;
> +    } else {
> +        *ppv = NULL;
> +        FIXME("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
> +        return E_NOINTERFACE;
> +    }

Please use debugstr_mshtml_guid and add IHTMLEditServices there.

> +
> +static IHTMLEditServices *create_editsvcs(void)
> +{
> +    editsvcs *ret = heap_alloc(sizeof(*ret));

Please handle heap_alloc failure here.

> +
> +    ret->IHTMLEditServices_iface.lpVtbl = &editsvcsVtbl;
> +    ret->ref = 1;
> +
> +    return &ret->IHTMLEditServices_iface;
> +}
> +
>  /**********************************************************
>   * IServiceProvider implementation
>   */
> @@ -259,6 +381,15 @@ static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFG
>          return IWindowForBindingUI_QueryInterface(&This->doc_obj->IWindowForBindingUI_iface, riid, ppv);
>      }
>  
> +    if(IsEqualGUID(&SID_SHTMLEditServices, guidService)) {
> +        FIXME("SID_SHTMLEditServices\n");

I think it should be TRACE.

Thanks,
Jacek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20151009/9d030813/attachment.html>


More information about the wine-devel mailing list