microsoft / CsWin32

A source generator to add a user-defined set of Win32 P/Invoke methods and supporting types to a C# project.
MIT License
2.05k stars 85 forks source link

Use proper SafeHandle types for specific APIs #941

Closed AArnott closed 1 year ago

AArnott commented 1 year ago

Some APIs return a common handle type but require the handle to be released with a less-common method. The metadata now includes this detail, and with this change, CsWin32 honors that.

Fixes microsoft/win32metadata#1581