RFC: More tests for riched20 ITextServices
Austin Lund
austin.lund at gmail.com
Fri Jul 4 02:12:57 CDT 2008
2008/7/4 Maarten Lankhorst <m.b.lankhorst at gmail.com>:
> Hi Austin,
>
> The second 'return E_NOINTERFACE' will never be reached.
>
> Cheers,
> Maarten.
>
GCC throws a warning if you remove it. Perhaps this is better:
static HRESULT WINAPI ITextHostImpl_QueryInterface(ITextHost *iface,
REFIID riid,
LPVOID *ppvObject) {
ITextHostTestImpl *This = (ITextHostTestImpl *)iface;
*ppvObject = NULL;
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_ITextHost)) {
*ppvObject = (LPVOID)This;
ITextHost_AddRef((ITextHost *)(*ppvObject));
return S_OK;
}
else
return E_NOINTERFACE;
}
More information about the wine-devel
mailing list