Skip to content

Provide RAII helpers for COM pointers #1596

@0x5bfa

Description

@0x5bfa

Is your feature request related to a problem? Please describe.

When I want to use a COM interface pointer in the non-marshal mode with CsWin32, you have to IUnknown::Release it manually. However, in C++, it's normal to use the RAII helpers, such as ComPtr, ComHeapPtr, etc.

Describe the solution you'd like

Generate RAII helpers for COM, such as ComPtr, ComHeapPtr, etc.

Describe alternatives you've considered

Do not implement this and let users of CsWin32 manually release COM pointers.

Additional context

Here's some sample implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions