Skip to content

GdiTextRenderer::QueryInterface does not increment the reference count on the returned object #391

Description

@zopsicle

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions