Even though CsWin32 currently doesn't happen to provide DeleteDCSafeHandle or ReleaseDCSafeHandle, I do have such classes that I'd like to pass as SafeHandle without having to do the whole boilerplate dance:
This usability issue afflicts BitBlt, CreateDIBSection, DrawIconEx, SelectObject, maybe others. For me, CsWin32 is about not having to intersperse interesting logic with .NET native interop boilerplate. It would be very much in that spirit to always provide SafeHandle overloads any time there is a handle wrapper struct.
Even though CsWin32 currently doesn't happen to provide DeleteDCSafeHandle or ReleaseDCSafeHandle, I do have such classes that I'd like to pass as SafeHandle without having to do the whole boilerplate dance:
This usability issue afflicts BitBlt, CreateDIBSection, DrawIconEx, SelectObject, maybe others. For me, CsWin32 is about not having to intersperse interesting logic with .NET native interop boilerplate. It would be very much in that spirit to always provide SafeHandle overloads any time there is a handle wrapper struct.
Context
LangVersion
(if explicitly set by project): 11