If I understand correctly, QueryInterface is supposed to do this. But GdiTextRenderer::QueryInterface does not. Is this a bug?
|
STDMETHODIMP GdiTextRenderer::QueryInterface( |
|
IID const& riid, |
|
void** ppvObject |
|
) |
|
{ |
|
if (__uuidof(IDWriteTextRenderer) == riid) |
|
{ |
|
*ppvObject = this; |
|
} |
|
else if (__uuidof(IDWritePixelSnapping) == riid) |
|
{ |
|
*ppvObject = this; |
|
} |
|
else if (__uuidof(IUnknown) == riid) |
|
{ |
|
*ppvObject = this; |
|
} |
|
else |
|
{ |
|
*ppvObject = NULL; |
|
return E_FAIL; |
|
} |
|
|
|
return S_OK; |
|
} |
If I understand correctly, QueryInterface is supposed to do this. But GdiTextRenderer::QueryInterface does not. Is this a bug?
Windows-classic-samples/Samples/Win7Samples/multimedia/DirectWrite/GdiInterop/GdiTextRenderer.cpp
Lines 261 to 285 in 2b94df5