We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EnumProcessModules receive FreeLibrarySafeHandle as module handles. However FreeLibrarySafeHandle contains only one module handle.
Get all module handles.
NativeMethods.txt
EnumProcessModules
NativeMethods.json
public static unsafe winmdroot.Foundation.BOOL EnumProcessModules(SafeHandle hProcess, out FreeLibrarySafeHandle lphModule, uint cb, out uint lpcbNeeded) { bool hProcessAddRef = false; try { fixed (uint* lpcbNeededLocal = &lpcbNeeded) { winmdroot.Foundation.HANDLE hProcessLocal; if (hProcess is object) { hProcess.DangerousAddRef(ref hProcessAddRef); hProcessLocal = (winmdroot.Foundation.HANDLE)hProcess.DangerousGetHandle(); } else throw new ArgumentNullException(nameof(hProcess)); winmdroot.Foundation.HMODULE lphModuleLocal; winmdroot.Foundation.BOOL __result = PInvoke.EnumProcessModules(hProcessLocal, &lphModuleLocal, cb, lpcbNeededLocal); lphModule = new FreeLibrarySafeHandle(lphModuleLocal, ownsHandle: true); return __result; } } finally { if (hProcessAddRef) hProcess.DangerousRelease(); } }
LangVersion
The text was updated successfully, but these errors were encountered:
Same root cause as #1266.
Sorry, something went wrong.
No branches or pull requests
Actual behavior
EnumProcessModules receive FreeLibrarySafeHandle as module handles. However FreeLibrarySafeHandle contains only one module handle.
Expected behavior
Get all module handles.
Repro steps
NativeMethods.txt
content:NativeMethods.json
content (if present):Current function content generated by cswin32 SG.
LangVersion
(if explicitly set by project): [latest]The text was updated successfully, but these errors were encountered: