|
// <auto-generated/>
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.28202")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial bool CloseHandle(nint handle)
{
int __lastError;
bool __retVal;
int __retVal_native;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke(handle);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "CloseHandle", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __handle_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.28202")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial nint CreateToolhelp32Snapshot(global::Interop.Kernel32.SnapshotFlags dwFlags, uint th32ProcessID)
{
int __lastError;
nint __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(dwFlags, th32ProcessID);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "CreateToolhelp32Snapshot", ExactSpelling = true)]
static extern unsafe nint __PInvoke(global::Interop.Kernel32.SnapshotFlags __dwFlags_native, uint __th32ProcessID_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.28202")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static unsafe partial bool Process32First(nint hSnapshot, global::Interop.Kernel32.PROCESSENTRY32* lppe)
{
int __lastError;
bool __retVal;
int __retVal_native;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke(hSnapshot, lppe);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "Process32FirstW", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __hSnapshot_native, global::Interop.Kernel32.PROCESSENTRY32* __lppe_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.28202")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static unsafe partial bool Process32Next(nint hSnapshot, global::Interop.Kernel32.PROCESSENTRY32* lppe)
{
int __lastError;
bool __retVal;
int __retVal_native;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke(hSnapshot, lppe);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "Process32NextW", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __hSnapshot_native, global::Interop.Kernel32.PROCESSENTRY32* __lppe_native);
}
}
}
|