You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The C# Process APIs use the IntPtr type, for instance when trying to get the handle from a Processhere.
When then making a Win32 call to something like SetForegroundWindow this needs to be explicitly cast to the generated HWD wrapper (which is unintuitive):
It'd be great if the generated methods could directly accept the IntPtr type from C# or the generated HWD helper to have an implicit converter setup to do the cast directly for the developer.
Thanks!
The text was updated successfully, but these errors were encountered:
@AArnott I think this would be a request of the projection. The Process API referenced here is the .NET API not a Win32 API. The request is to accept IntPtr wherever HWND is accepted to avoid the (HWND) cast.
Ah, I may have misunderstood the feedback. I thought the IntPtr was coming from the metadata, but I see now it's coming from a BCL type. @michael-hawker, I'm sorry to misdirect you. I'll reply again on that discussion. Let's close this issue since there's nothing for the metadata repo to do.
Was told to follow issue here from this conversation.
The C# Process APIs use the
IntPtr
type, for instance when trying to get the handle from aProcess
here.When then making a Win32 call to something like
SetForegroundWindow
this needs to be explicitly cast to the generatedHWD
wrapper (which is unintuitive):It'd be great if the generated methods could directly accept the
IntPtr
type from C# or the generatedHWD
helper to have an implicit converter setup to do the cast directly for the developer.Thanks!
The text was updated successfully, but these errors were encountered: