Actual behavior
The friendly overload for these functions is:
internal static unsafe global::Windows.Win32.Foundation.NTSTATUS NtQueryInformationProcess(global::Windows.Win32.Foundation.HANDLE ProcessHandle, winmdroot.System.Threading.PROCESSINFOCLASS ProcessInformationClass, void* ProcessInformation, uint ProcessInformationLength, ref uint ReturnLength)
and
internal static unsafe global::Windows.Win32.Foundation.NTSTATUS NtQuerySystemInformation(winmdroot.System.SystemInformation.SYSTEM_INFORMATION_CLASS SystemInformationClass, void* SystemInformation, uint SystemInformationLength, ref uint ReturnLength)
However, NtQueryObject() uses an expected Span<byte> buffer instead:
internal static unsafe global::Windows.Win32.Foundation.NTSTATUS NtQueryObject(global::Windows.Win32.Foundation.HANDLE Handle, winmdroot.Foundation.OBJECT_INFORMATION_CLASS ObjectInformationClass, Span<byte> ObjectInformation, out uint ReturnLength)
Expected behavior
That the Nt* family of methods have a consistent overload experience.
Repro steps
N/A
NativeMethods.txt content:
NtQueryInformationProcess
NtQuerySystemInformation
NtQueryObject
-
NativeMethods.json content (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