microsoft / microsoft/Windows-classic-samples

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

Open
#391 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
5.7k
Forks
3.3k
PR merge metrics
No merged PRs in 30d

Description

If I understand correctly, QueryInterface is supposed to do this. But GdiTextRenderer::QueryInterface does not. Is this a bug?

https://github.com/microsoft/Windows-classic-samples/blob/2b94df5730177ec27e726b60017c01c97ef1a8fb/Samples/Win7Samples/multimedia/DirectWrite/GdiInterop/GdiTextRenderer.cpp#L261-L285

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the linked GdiTextRenderer.cpp section and inspect GdiTextRenderer::QueryInterface against the stated QueryInterface reference-count requirement. Confirm the returned object increments its reference count, then verify the DirectWrite GDI interop sample still behaves correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, desktop-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.