-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Actual behavior
This one's an oldie, but I never reported it and just used the direct P/Invoke. The friendly wrapper for EnumProcessModules() has a signature of internal static unsafe winmdroot.Foundation.BOOL EnumProcessModules(SafeHandle hProcess, out global::Windows.Win32.FreeLibrarySafeHandle lphModule, uint cb, out uint lpcbNeeded), however while the docs say lphModule is an out parameter, it needs to be a handle to a buffer to receive an array of handle pointers, at least as large enough as lpcbNeeded specifies.
Expected behavior
This friendly wrapper should probably accept a Span<HMODULE>() parameter if possible, or at least Span<byte> and then the caller can read the byte array as they would any of the other P/Invokes.
This would mean that the friendly overload for GetModuleInformation() would need to directly accept the HMODULE value as well.
Repro steps
N/A
NativeMethods.txtcontent:
EnumProcessModules
-
NativeMethods.jsoncontent (if present):
N/A -
Any of your own code that should be shared?
N/A
Context
- CsWin32 version: 0.3.253
- Win32Metadata version (if explicitly set by project): N/A
- Target Framework: net472
LangVersion(if explicitly set by project): N/A