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
{{ message }}
Repository navigation
Ability to turn off usage of safe handles in overloads #605
Is your feature request related to a problem? Please describe.
In Windows Forms we generally don't use safe handle in our interop but we do use string marshalling. In order to use the friendly overloads we need to turn off the usage of safe handles.
This blocked us from using HMODULE GetModuleHandle(PCWSTR) as we couldn't hack around the generated easy wrapper that returned the SafeHandle. We had to use GetModuleHandleEx to avoid getting a safe handle. There is also a bug in the generated GetModuleHandle safe overload, opening a bug on it.
Activity
JeremyKuhne commentedon Jul 21, 2022
This blocked us from using
HMODULE GetModuleHandle(PCWSTR)as we couldn't hack around the generated easy wrapper that returned theSafeHandle. We had to useGetModuleHandleExto avoid getting a safe handle. There is also a bug in the generatedGetModuleHandlesafe overload, opening a bug on it.JeremyKuhne commentedon Jul 21, 2022
The GetModuleHandle bug: #616