Skip to content

GetDC incorrectly returns, and DrawIconEx incorrectly requires, a safe handle that calls DeleteDC instead of ReleaseDC #251

@jnm2

Description

@jnm2

Related, possible solution: microsoft/CsWin32#111

GetDC is paired with ReleaseDC, not DeleteDC.

DrawIconEx and probably all other APIs taking hdc parameters do not care what kind of DC you pass it, so DeleteDC/ReleaseDC should not be encoded into the names of the types used by any of their parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    broken apiAn API is inaccurate and could lead to runtime failure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions