Replies: 2 comments 3 replies
-
|
This is dictated by the metadata. I don't have time to review the case right now, but I'll move to the repo where the decision and change would need to be made. |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
Duplicate of microsoft/CsWin32#209 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm implementing some of the classic examples from Petzold's Programming Windows using CsWin32 (as a learning exercise), and I ran into a minor issue converting the following code from HelloWin.c's WndProc:
Original
My C# code
This fails to compile with
CS1503 Argument 1: cannot convert from 'Windows.Win32.Graphics.Gdi.HDC' to 'System.Runtime.InteropServices.SafeHandle'.PInvoke.DrawText()expects a SafeHandle butPInvoke.BeginPaint()does not return a SafeHandle implementation.I can wrap the HDC in a SafeHandle myself, but I think CsWin32 should be doing this for me (the README says "SafeHandle-types automatically generated"). Is that correct or am I missing something here?
(Version info: CsWin32 0.1.506-beta, Visual Studio 16.11.0 Preview 1.0, .NET 6 Preview 4)
Beta Was this translation helpful? Give feedback.
All reactions