Provide RAII helpers for COM pointers
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.5k
- Forks
- 123
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 9
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked ComPtr and ComHeapPtr sample implementations to understand the proposed RAII patterns and how they release COM resources. Then inspect the CsWin32 generation entry points and determine the scope of the requested helpers; the work is done when suitable helpers are generated for non-marshal COM pointers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100