[3/3] riched20: Implement ITextDocument_fnGetSelection.
Alexandre Julliard
julliard at winehq.org
Mon Jun 23 05:45:18 CDT 2008
Dan Hipschman <dsh at linux.ucla.edu> writes:
> @@ -532,6 +538,709 @@ static const ITextDocumentVtbl tdvt = {
> ITextDocument_fnRangeFromPoint
> };
>
> +/*** IUnknown methods ***/
> +static HRESULT WINAPI ITextSelection_fnQueryInterface(
> + ITextSelection *me,
> + REFIID riid,
> + void **ppvObj)
> +{
> + ITextSelectionImpl *This = (ITextSelectionImpl *) me;
> +
> + TRACE("%p %s\n", This, debugstr_guid(riid));
> +
> + *ppvObj = NULL;
> + if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ITextSelection))
> + {
> + *ppvObj = me;
> + return S_OK;
> + }
> +
> + return E_NOINTERFACE;
> +}
> +
> +static ULONG WINAPI ITextSelection_fnAddRef(
> + ITextSelection *me)
> +{
> + return 2;
> +}
> +
> +static ULONG WINAPI ITextSelection_fnRelease(
> + ITextSelection *me)
> +{
> + return 1;
> +}
The ref counting isn't correct. Most likely ITextSelection should be
implemented directly by the main object, and share its ref count.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list