File: Windows.Wdk.PInvoke.ntdll.dll.g.cs
Project: src\src\VisualStudio\IntegrationTest\Harness\XUnit\Microsoft.VisualStudio.Extensibility.Testing.Xunit.csproj (Microsoft.VisualStudio.Extensibility.Testing.Xunit)
// ------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------

#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using winmdroot = global::Windows.Wdk;
namespace Windows.Wdk
{

	/// <content>
	/// Contains extern methods from "ntdll.dll".
	/// </content>
	[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.106+a37a0b4b70")]
	internal static partial class PInvoke
	{
		/// <inheritdoc cref="NtQueryInformationProcess(global::Windows.Win32.Foundation.HANDLE, winmdroot.System.Threading.PROCESSINFOCLASS, void*, uint, uint*)"/>
		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)
		{
			fixed (uint* ReturnLengthLocal = &ReturnLength)
			{
				global::Windows.Win32.Foundation.NTSTATUS __result = PInvoke.NtQueryInformationProcess(ProcessHandle, ProcessInformationClass, ProcessInformation, ProcessInformationLength, ReturnLengthLocal);
				return __result;
			}
		}

		/// <summary>Retrieves information about the specified process. (NtQueryInformationProcess)</summary>
		/// <param name="ProcessHandle">A handle to the process for which information is to be retrieved.</param>
		/// <param name="ProcessInformationClass"></param>
		/// <param name="ProcessInformation">A pointer to a buffer supplied by the calling application into which the function writes the requested information. The size of the information written varies depending on the data type of the <i>ProcessInformationClass</i> parameter:</param>
		/// <param name="ProcessInformationLength">The size of the buffer pointed to by the <i>ProcessInformation</i> parameter, in bytes.</param>
		/// <param name="ReturnLength">A pointer to a variable in which the function returns the size of the requested information. If the function was successful, this is the size of the information written to the buffer pointed to by the <i>ProcessInformation</i> parameter (if the buffer was too small, this is the minimum size of buffer needed to receive the information successfully).</param>
		/// <returns>
		/// <para>The function returns an NTSTATUS success or error code. The forms and significance of NTSTATUS error codes are listed in the Ntstatus.h header file available in the DDK. See [Logging Errors](/windows-hardware/drivers/kernel/logging-errors) for more details.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <b>NtQueryInformationProcess</b> function and the structures that it returns are internal to the operating system and  subject to change from one  release of Windows to another.  To maintain the    compatibility of your application, it is better to use public functions mentioned in the description of the <i>ProcessInformationClass</i> parameter instead. If you do use <b>NtQueryInformationProcess</b>, access the function through <a href="https://docs.microsoft.com/windows/desktop/Dlls/using-run-time-dynamic-linking">run-time dynamic linking</a>.  This gives  your code an opportunity to respond gracefully if the function has been   changed or removed from the operating system. Signature changes, however, may not be detectable. This function has no associated import library. You must use the <a href="https://docs.microsoft.com/windows/desktop/api/libloaderapi/nf-libloaderapi-loadlibrarya">LoadLibrary</a> and <a href="https://docs.microsoft.com/windows/desktop/api/libloaderapi/nf-libloaderapi-getprocaddress">GetProcAddress</a> functions to dynamically link to Ntdll.dll.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winternl/nf-winternl-ntqueryinformationprocess#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("ntdll.dll", ExactSpelling = true)]
		[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		internal static extern unsafe global::Windows.Win32.Foundation.NTSTATUS NtQueryInformationProcess(global::Windows.Win32.Foundation.HANDLE ProcessHandle, winmdroot.System.Threading.PROCESSINFOCLASS ProcessInformationClass, void* ProcessInformation, uint ProcessInformationLength, uint* ReturnLength);
	}
}