File: Windows.Win32.PInvokeCore.USER32.dll.g.cs
Project: src\src\System.Private.Windows.Core\src\System.Private.Windows.Core.csproj (System.Private.Windows.Core)
// ------------------------------------------------------------------------------
// <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 global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{

	/// <content>
	/// Contains extern methods from "USER32.dll".
	/// </content>
	internal static partial class PInvokeCore
	{
		/// <inheritdoc cref="BeginPaint(winmdroot.Foundation.HWND, winmdroot.Graphics.Gdi.PAINTSTRUCT*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Graphics.Gdi.HDC BeginPaint(winmdroot.Foundation.HWND hWnd, out winmdroot.Graphics.Gdi.PAINTSTRUCT lpPaint)
		{
			fixed (winmdroot.Graphics.Gdi.PAINTSTRUCT* lpPaintLocal = &lpPaint)
			{
				winmdroot.Graphics.Gdi.HDC __result = PInvokeCore.BeginPaint(hWnd, lpPaintLocal);
				return __result;
			}
		}

		/// <summary>The BeginPaint function prepares the specified window for painting and fills a PAINTSTRUCT structure with information about the painting.</summary>
		/// <param name="hWnd">Handle to the window to be repainted.</param>
		/// <param name="lpPaint">Pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-paintstruct">PAINTSTRUCT</a> structure that will receive painting information.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is the handle to a display device context for the specified window. If the function fails, the return value is <b>NULL</b>, indicating that no display device context is available.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <b>BeginPaint</b> function automatically sets the clipping region of the device context to exclude any area outside the update region. The update region is set by the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-invalidaterect">InvalidateRect</a> or <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-invalidatergn">InvalidateRgn</a> function and by the system after sizing, moving, creating, scrolling, or any other operation that affects the client area. If the update region is marked for erasing, <b>BeginPaint</b> sends a <b>WM_ERASEBKGND</b> message to the window. An application should not call <b>BeginPaint</b> except in response to a <b>WM_PAINT</b> message. Each call to <b>BeginPaint</b> must have a corresponding call to the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-endpaint">EndPaint</a> function. If the caret is in the area to be painted, <b>BeginPaint</b> automatically hides the caret to prevent it from being erased. If the window's class has a background brush, <b>BeginPaint</b> uses that brush to erase the background of the update region before returning. <h3><a id="DPI_Virtualization"></a><a id="dpi_virtualization"></a><a id="DPI_VIRTUALIZATION"></a>DPI Virtualization</h3> This API does not participate in DPI virtualization. The output returned is always in terms of physical pixels.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-beginpaint#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Graphics.Gdi.HDC BeginPaint(winmdroot.Foundation.HWND hWnd, winmdroot.Graphics.Gdi.PAINTSTRUCT* lpPaint);

		/// <summary>Passes message information to the specified window procedure. (Unicode)</summary>
		/// <param name="lpPrevWndFunc">
		/// <para>Type: <b>WNDPROC</b> The previous window procedure. If this value is obtained by calling the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getwindowlonga">GetWindowLong</a> function with the <i>nIndex</i> parameter set to <b>GWL_WNDPROC</b> or <b>DWL_DLGPROC</b>, it is actually either the address of a window or dialog box procedure, or a special internal value meaningful only to <b>CallWindowProc</b>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-callwindowprocw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="hWnd">
		/// <para>Type: <b>HWND</b> A handle to the window procedure to receive the message.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-callwindowprocw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="Msg">
		/// <para>Type: <b>UINT</b> The message.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-callwindowprocw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="wParam">
		/// <para>Type: <b>WPARAM</b> Additional message-specific information. The contents of this parameter depend on the value of the <i>Msg</i> parameter.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-callwindowprocw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lParam">
		/// <para>Type: <b>LPARAM</b> Additional message-specific information. The contents of this parameter depend on the value of the <i>Msg</i> parameter.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-callwindowprocw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>LRESULT</b> The return value specifies the result of the message processing and depends on the message sent.</para>
		/// </returns>
		/// <remarks>
		/// <para>Use the <b>CallWindowProc</b> function for window subclassing. Usually, all windows with the same class share one window procedure. A subclass is a window or set of windows with the same class whose messages are intercepted and processed by another window procedure (or procedures) before being passed to the window procedure of the class. The <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-setwindowlonga">SetWindowLong</a> function creates the subclass by changing the window procedure associated with a particular window, causing the system to call the new window procedure instead of the previous one. An application must pass any messages not processed by the new window procedure to the previous window procedure by calling <b>CallWindowProc</b>. This allows the application to create a chain of window procedures. If <b>STRICT</b> is defined, the <i>lpPrevWndFunc</i> parameter has the data type <b>WNDPROC</b>. The <b>WNDPROC</b> type is declared as follows:</para>
		/// <para></para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-callwindowprocw#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "CallWindowProcW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.LRESULT CallWindowProc(delegate *unmanaged[Stdcall]<global::Windows.Win32.Foundation.HWND,uint,global::Windows.Win32.Foundation.WPARAM,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.LRESULT> lpPrevWndFunc, winmdroot.Foundation.HWND hWnd, uint Msg, winmdroot.Foundation.WPARAM wParam, winmdroot.Foundation.LPARAM lParam);

		/// <summary>Creates a new image (icon, cursor, or bitmap) and copies the attributes of the specified image to the new one. If necessary, the function stretches the bits to fit the desired size of the new image.</summary>
		/// <param name="h">
		/// <para>Type: <b>HANDLE</b> A handle to the image to be copied.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-copyimage#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="type">Type: <b>UINT</b></param>
		/// <param name="cx">
		/// <para>Type: <b>int</b> The desired width, in pixels, of the image. If this is zero, then the returned image will have the same width as the original <i>hImage</i>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-copyimage#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="cy">
		/// <para>Type: <b>int</b> The desired height, in pixels, of the image. If this is zero, then the returned image will have the same height as the original <i>hImage</i>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-copyimage#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="flags">Type: <b>UINT</b></param>
		/// <returns>
		/// <para>Type: <b>HANDLE</b> If the function succeeds, the return value is the handle to the newly created image. If the function fails, the return value is <b>NULL</b>. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>When you are finished using the resource, you can release its associated memory by calling one of the functions in the following table. </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-copyimage#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static winmdroot.Foundation.HANDLE CopyImage(winmdroot.Foundation.HANDLE h, winmdroot.UI.WindowsAndMessaging.GDI_IMAGE_TYPE type, int cx, int cy, winmdroot.UI.WindowsAndMessaging.IMAGE_FLAGS flags)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.HANDLE __retVal = LocalExternFunction(h, type, cx, cy, flags);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "CopyImage"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern winmdroot.Foundation.HANDLE LocalExternFunction(winmdroot.Foundation.HANDLE h, winmdroot.UI.WindowsAndMessaging.GDI_IMAGE_TYPE type, int cx, int cy, winmdroot.UI.WindowsAndMessaging.IMAGE_FLAGS flags);
		}

		/// <summary>Calls the default window procedure to provide default processing for any window messages that an application does not process. (Unicode)</summary>
		/// <param name="hWnd">
		/// <para>Type: <b>HWND</b> A handle to the window procedure that received the message.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-defwindowprocw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="Msg">
		/// <para>Type: <b>UINT</b> The message.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-defwindowprocw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="wParam">
		/// <para>Type: <b>WPARAM</b> Additional message information. The content of this parameter depends on the value of the <i>Msg</i> parameter.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-defwindowprocw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lParam">
		/// <para>Type: <b>LPARAM</b> Additional message information. The content of this parameter depends on the value of the <i>Msg</i> parameter.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-defwindowprocw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>LRESULT</b> The return value is the result of the message processing and depends on the message.</para>
		/// </returns>
		/// <remarks>
		/// <para>> [!NOTE] > The winuser.h header defines DefWindowProc as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see [Conventions for Function Prototypes](/windows/win32/intl/conventions-for-function-prototypes).</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-defwindowprocw#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "DefWindowProcW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.LRESULT DefWindowProc(winmdroot.Foundation.HWND hWnd, uint Msg, winmdroot.Foundation.WPARAM wParam, winmdroot.Foundation.LPARAM lParam);

		/// <summary>Destroys an icon and frees any memory the icon occupied.</summary>
		/// <param name="hIcon">
		/// <para>Type: <b>HICON</b> A handle to the icon to be destroyed. The icon must not be in use.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-destroyicon#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>It is only necessary to call <b>DestroyIcon</b> for icons and cursors created with the following functions: <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-createiconfromresourceex">CreateIconFromResourceEx</a> (if called without the <b>LR_SHARED</b> flag), <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-createiconindirect">CreateIconIndirect</a>, and <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-copyicon">CopyIcon</a>. Do not use this function to destroy a shared icon. A shared icon is valid as long as the module from which it was loaded remains in memory. The following functions obtain a shared icon. </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-destroyicon#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static winmdroot.Foundation.BOOL DestroyIcon(winmdroot.UI.WindowsAndMessaging.HICON hIcon)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.BOOL __retVal = LocalExternFunction(hIcon);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "DestroyIcon"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.UI.WindowsAndMessaging.HICON hIcon);
		}

		/// <summary>Draws an icon or cursor into the specified device context, performing the specified raster operations, and stretching or compressing the icon or cursor as specified.</summary>
		/// <param name="hdc">
		/// <para>Type: <b>HDC</b> A handle to the device context into which the icon or cursor will be drawn.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-drawiconex#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="xLeft">
		/// <para>Type: <b>int</b> The logical x-coordinate of the upper-left corner of the icon or cursor.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-drawiconex#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="yTop">
		/// <para>Type: <b>int</b> The logical y-coordinate of the upper-left corner of the icon or cursor.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-drawiconex#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="hIcon">
		/// <para>Type: <b>HICON</b> A handle to the icon or cursor to be drawn. This parameter can identify an animated cursor.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-drawiconex#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="cxWidth">
		/// <para>Type: <b>int</b> The logical width of the icon or cursor. If this parameter is zero and the <i>diFlags</i> parameter is <b>DI_DEFAULTSIZE</b>, the function uses the <b>SM_CXICON</b> system metric value to set the width. If this parameter is zero and <b>DI_DEFAULTSIZE</b> is not used, the function uses the actual resource width.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-drawiconex#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="cyWidth">
		/// <para>Type: <b>int</b> The logical height of the icon or cursor. If this parameter is zero and the <i>diFlags</i> parameter is <b>DI_DEFAULTSIZE</b>, the function uses the <b>SM_CYICON</b> system metric value to set the width. If this parameter is zero and <b>DI_DEFAULTSIZE</b> is not used, the function uses the actual resource height.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-drawiconex#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="istepIfAniCur">
		/// <para>Type: <b>UINT</b> The index of the frame to draw, if <i>hIcon</i> identifies an animated cursor. This parameter is ignored if <i>hIcon</i> does not identify an animated cursor.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-drawiconex#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="hbrFlickerFreeDraw">
		/// <para>Type: <b>HBRUSH</b> A handle to a brush that the system uses for flicker-free drawing. If <i>hbrFlickerFreeDraw</i> is a valid brush handle, the system creates an offscreen bitmap using the specified brush for the background color, draws the icon or cursor into the bitmap, and then copies the bitmap into the device context identified by <i>hdc</i>. If <i>hbrFlickerFreeDraw</i> is <b>NULL</b>, the system draws the icon or cursor directly into the device context.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-drawiconex#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="diFlags">Type: <b>UINT</b></param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <b>DrawIconEx</b> function places the icon's upper-left corner at the location specified by the <i>xLeft</i> and <i>yTop</i> parameters. The location is subject to the current mapping mode of the device context. If only one of the <b>DI_IMAGE</b> and <b>DI_MASK</b> flags is set, then the corresponding bitmap is drawn with the <b>SRCCOPY</b> <a href="https://docs.microsoft.com/windows/win32/api/wingdi/nf-wingdi-bitblt">raster operation code</a>. If both the <b>DI_IMAGE</b> and <b>DI_MASK</b> flags are set: * If the icon or cursor is a 32-bit alpha-blended icon or cursor, then the image is drawn with <b>AC_SRC_OVER</b> <a href="https://docs.microsoft.com/windows/win32/api/wingdi/ns-wingdi-blendfunction">blend function</a> and the mask is ignored. * For all other icons or cursors, the mask is drawn with the <b>SRCAND</b> <a href="https://docs.microsoft.com/windows/win32/api/wingdi/nf-wingdi-bitblt">raster operation code</a>, and the image is drawn with the <b>SRCINVERT</b> <a href="https://docs.microsoft.com/windows/win32/api/wingdi/nf-wingdi-bitblt">raster operation code</a> To duplicate <c>DrawIcon (hDC, X, Y, hIcon)</c>, call <b>DrawIconEx</b> as follows: </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-drawiconex#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static winmdroot.Foundation.BOOL DrawIconEx(winmdroot.Graphics.Gdi.HDC hdc, int xLeft, int yTop, winmdroot.UI.WindowsAndMessaging.HICON hIcon, int cxWidth, int cyWidth, uint istepIfAniCur, winmdroot.Graphics.Gdi.HBRUSH hbrFlickerFreeDraw, winmdroot.UI.WindowsAndMessaging.DI_FLAGS diFlags)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.BOOL __retVal = LocalExternFunction(hdc, xLeft, yTop, hIcon, cxWidth, cyWidth, istepIfAniCur, hbrFlickerFreeDraw, diFlags);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "DrawIconEx"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc, int xLeft, int yTop, winmdroot.UI.WindowsAndMessaging.HICON hIcon, int cxWidth, int cyWidth, uint istepIfAniCur, winmdroot.Graphics.Gdi.HBRUSH hbrFlickerFreeDraw, winmdroot.UI.WindowsAndMessaging.DI_FLAGS diFlags);
		}

		/// <inheritdoc cref="EndPaint(winmdroot.Foundation.HWND, winmdroot.Graphics.Gdi.PAINTSTRUCT*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL EndPaint(winmdroot.Foundation.HWND hWnd, in winmdroot.Graphics.Gdi.PAINTSTRUCT lpPaint)
		{
			fixed (winmdroot.Graphics.Gdi.PAINTSTRUCT* lpPaintLocal = &lpPaint)
			{
				winmdroot.Foundation.BOOL __result = PInvokeCore.EndPaint(hWnd, lpPaintLocal);
				return __result;
			}
		}

		/// <summary>The EndPaint function marks the end of painting in the specified window. This function is required for each call to the BeginPaint function, but only after painting is complete.</summary>
		/// <param name="hWnd">Handle to the window that has been repainted.</param>
		/// <param name="lpPaint">Pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-paintstruct">PAINTSTRUCT</a> structure that contains the painting information retrieved by <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-beginpaint">BeginPaint</a>.</param>
		/// <returns>The return value is always nonzero.</returns>
		/// <remarks>
		/// <para>If the caret was hidden by <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-beginpaint">BeginPaint</a>, <b>EndPaint</b> restores the caret to the screen. <b>EndPaint</b> releases the display device context that <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-beginpaint">BeginPaint</a> retrieved.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-endpaint#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL EndPaint(winmdroot.Foundation.HWND hWnd, winmdroot.Graphics.Gdi.PAINTSTRUCT* lpPaint);

		/// <summary>Enumerates the child windows that belong to the specified parent window by passing the handle to each child window, in turn, to an application-defined callback function.</summary>
		/// <param name="hWndParent">
		/// <para>Type: <b>HWND</b> A handle to the parent window whose child windows are to be enumerated. If this parameter is <b>NULL</b>, this function is equivalent to <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-enumwindows">EnumWindows</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumchildwindows#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lpEnumFunc">
		/// <para>Type: <b>WNDENUMPROC</b> A pointer to an application-defined callback function. For more information, see <a href="https://docs.microsoft.com/previous-versions/windows/desktop/legacy/ms633493(v=vs.85)">EnumChildProc</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumchildwindows#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lParam">
		/// <para>Type: <b>LPARAM</b> An application-defined value to be passed to the callback function.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumchildwindows#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> The return value is not used.</para>
		/// </returns>
		/// <remarks>
		/// <para>If a child window has created child windows of its own, <b>EnumChildWindows</b> enumerates those windows as well. A child window that is moved or repositioned in the Z order during the enumeration process will be properly enumerated. The function does not enumerate a child window that is destroyed before being enumerated or that is created during the enumeration process.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumchildwindows#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL EnumChildWindows(winmdroot.Foundation.HWND hWndParent, delegate *unmanaged[Stdcall]<global::Windows.Win32.Foundation.HWND,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL> lpEnumFunc, winmdroot.Foundation.LPARAM lParam);

		/// <inheritdoc cref="EnumDisplayMonitors(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.RECT*, delegate *unmanaged[Stdcall]{global::Windows.Win32.Graphics.Gdi.HMONITOR,global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Foundation.RECT*,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL}, winmdroot.Foundation.LPARAM)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL EnumDisplayMonitors(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.RECT? lprcClip, delegate *unmanaged[Stdcall]<global::Windows.Win32.Graphics.Gdi.HMONITOR,global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Foundation.RECT*,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL> lpfnEnum, winmdroot.Foundation.LPARAM dwData)
		{
			winmdroot.Foundation.RECT lprcClipLocal = lprcClip ?? default(winmdroot.Foundation.RECT);
			winmdroot.Foundation.BOOL __result = PInvokeCore.EnumDisplayMonitors(hdc, lprcClip.HasValue ? &lprcClipLocal : null, lpfnEnum, dwData);
			return __result;
		}

		/// <summary>The EnumDisplayMonitors function enumerates display monitors (including invisible pseudo-monitors associated with the mirroring drivers) that intersect a region formed by the intersection of a specified clipping rectangle and the visible region of a device context. EnumDisplayMonitors calls an application-defined MonitorEnumProc callback function once for each monitor that is enumerated. Note that GetSystemMetrics (SM_CMONITORS) counts only the display monitors.</summary>
		/// <param name="hdc">
		/// <para>A handle to a display device context that defines the visible region of interest. If this parameter is <b>NULL</b>, the <i>hdcMonitor</i> parameter passed to the callback function will be <b>NULL</b>, and the visible region of interest is the virtual screen that encompasses all the displays on the desktop.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumdisplaymonitors#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lprcClip">
		/// <para>A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that specifies a clipping rectangle. The region of interest is the intersection of the clipping rectangle with the visible region specified by <i>hdc</i>. If <i>hdc</i> is non-<b>NULL</b>, the coordinates of the clipping rectangle are relative to the origin of the <i>hdc</i>. If <i>hdc</i> is <b>NULL</b>, the coordinates are virtual-screen coordinates. This parameter can be <b>NULL</b> if you don't want to clip the region specified by <i>hdc</i>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumdisplaymonitors#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lpfnEnum">A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nc-winuser-monitorenumproc">MonitorEnumProc</a> application-defined callback function.</param>
		/// <param name="dwData">Application-defined data that <b>EnumDisplayMonitors</b> passes directly to the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nc-winuser-monitorenumproc">MonitorEnumProc</a> function.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>There are two reasons to call the <b>EnumDisplayMonitors</b> function: </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumdisplaymonitors#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL EnumDisplayMonitors(winmdroot.Graphics.Gdi.HDC hdc, [Optional] winmdroot.Foundation.RECT* lprcClip, delegate *unmanaged[Stdcall]<global::Windows.Win32.Graphics.Gdi.HMONITOR,global::Windows.Win32.Graphics.Gdi.HDC,global::Windows.Win32.Foundation.RECT*,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL> lpfnEnum, winmdroot.Foundation.LPARAM dwData);

		/// <summary>Enumerates all nonchild windows associated with a thread by passing the handle to each window, in turn, to an application-defined callback function.</summary>
		/// <param name="dwThreadId">
		/// <para>Type: <b>DWORD</b> The identifier of the thread whose windows are to be enumerated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumthreadwindows#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lpfn">
		/// <para>Type: <b>WNDENUMPROC</b> A pointer to an application-defined callback function. For more information, see <a href="https://docs.microsoft.com/previous-versions/windows/desktop/legacy/ms633496(v=vs.85)">EnumThreadWndProc</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumthreadwindows#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lParam">
		/// <para>Type: <b>LPARAM</b> An application-defined value to be passed to the callback function.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumthreadwindows#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If the callback function returns <b>TRUE</b> for all windows in the thread specified by <i>dwThreadId</i>, the return value is <b>TRUE</b>. If the callback function returns <b>FALSE</b> on any enumerated window, or if there are no windows found in the thread specified by <i>dwThreadId</i>, the return value is <b>FALSE</b>.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumthreadwindows">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL EnumThreadWindows(uint dwThreadId, delegate *unmanaged[Stdcall]<global::Windows.Win32.Foundation.HWND,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL> lpfn, winmdroot.Foundation.LPARAM lParam);

		/// <summary>Enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumWindows continues until the last top-level window is enumerated or the callback function returns FALSE.</summary>
		/// <param name="lpEnumFunc">
		/// <para>Type: <b>WNDENUMPROC</b> A pointer to an application-defined callback function. For more information, see <a href="https://docs.microsoft.com/previous-versions/windows/desktop/legacy/ms633498(v=vs.85)">EnumWindowsProc</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumwindows#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lParam">
		/// <para>Type: <b>LPARAM</b> An application-defined value to be passed to the callback function.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumwindows#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>. If <a href="https://docs.microsoft.com/previous-versions/windows/desktop/legacy/ms633498(v=vs.85)">EnumWindowsProc</a> returns zero, the return value is also zero. In this case, the callback function should call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-setlasterror">SetLastError</a> to obtain a meaningful error code to be returned to the caller of <b>EnumWindows</b>.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <b>EnumWindows</b> function does not enumerate child windows, with the exception of a few top-level windows owned by the system that have the <b>WS_CHILD</b> style. This function is more reliable than calling the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getwindow">GetWindow</a> function in a loop. An application that calls <b>GetWindow</b> to perform this task risks being caught in an infinite loop or referencing a handle to a window that has been destroyed. <div class="alert"><b>Note</b>  For Windows 8 and later, <b>EnumWindows</b> enumerates only top-level windows of desktop apps.</div> <div> </div></para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-enumwindows#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL EnumWindows(delegate *unmanaged[Stdcall]<global::Windows.Win32.Foundation.HWND,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL> lpEnumFunc, winmdroot.Foundation.LPARAM lParam)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.BOOL __retVal = LocalExternFunction(lpEnumFunc, lParam);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "EnumWindows"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(delegate *unmanaged[Stdcall]<global::Windows.Win32.Foundation.HWND,global::Windows.Win32.Foundation.LPARAM,global::Windows.Win32.Foundation.BOOL> lpEnumFunc, winmdroot.Foundation.LPARAM lParam);
		}

		/// <inheritdoc cref="GetClientRect(winmdroot.Foundation.HWND, winmdroot.Foundation.RECT*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetClientRect(winmdroot.Foundation.HWND hWnd, out winmdroot.Foundation.RECT lpRect)
		{
			fixed (winmdroot.Foundation.RECT* lpRectLocal = &lpRect)
			{
				winmdroot.Foundation.BOOL __result = PInvokeCore.GetClientRect(hWnd, lpRectLocal);
				return __result;
			}
		}

		/// <summary>Retrieves the coordinates of a window's client area.</summary>
		/// <param name="hWnd">
		/// <para>Type: <b>HWND</b> A handle to the window whose client coordinates are to be retrieved.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getclientrect#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lpRect">
		/// <para>Type: <b>LPRECT</b> A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that receives the client coordinates. The <b>left</b> and <b>top</b> members are zero. The <b>right</b> and <b>bottom</b> members contain the width and height of the window.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getclientrect#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>In conformance with conventions for the <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure, the bottom-right coordinates of the returned rectangle are exclusive. In other words, the pixel at (<b>right</b>, <b>bottom</b>) lies immediately outside the rectangle.</remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetClientRect(winmdroot.Foundation.HWND hWnd, winmdroot.Foundation.RECT* lpRect)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.BOOL __retVal = LocalExternFunction(hWnd, lpRect);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetClientRect"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.HWND hWnd, winmdroot.Foundation.RECT* lpRect);
		}

		/// <summary>Retrieves from the clipboard the name of the specified registered format. The function copies the name to the specified buffer. (Unicode)</summary>
		/// <param name="format">
		/// <para>Type: <b>UINT</b> The type of format to be retrieved. This parameter must not specify any of the predefined clipboard formats.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getclipboardformatnamew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lpszFormatName">
		/// <para>Type: <b>LPTSTR</b> The buffer that is to receive the format name.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getclipboardformatnamew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="cchMaxCount">
		/// <para>Type: <b>int</b> The maximum length, in characters, of the string to be copied to the buffer. If the name exceeds this limit, it is truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getclipboardformatnamew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>int</b> If the function succeeds, the return value is the length, in characters, of the string copied to the buffer. If the function fails, the return value is zero, indicating that the requested format does not exist or is predefined. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para><h3><a id="Security_Considerations"></a><a id="security_considerations"></a><a id="SECURITY_CONSIDERATIONS"></a>Security Considerations</h3> Using this function incorrectly might compromise the security of your program. For example, miscalculating the proper size of the <i>lpszFormatName</i> buffer, especially when the application is used in both ANSI and Unicode versions, can cause a buffer overflow. Also, note that the string is truncated if it is longer than the <i>cchMaxCount</i> parameter, which can lead to loss of information.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getclipboardformatnamew#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static int GetClipboardFormatName(uint format, winmdroot.Foundation.PWSTR lpszFormatName, int cchMaxCount)
		{
			Marshal.SetLastSystemError(0);
			int __retVal = LocalExternFunction(format, lpszFormatName, cchMaxCount);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetClipboardFormatNameW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern int LocalExternFunction(uint format, winmdroot.Foundation.PWSTR lpszFormatName, int cchMaxCount);
		}

		/// <summary>The GetDC function retrieves a handle to a device context (DC) for the client area of a specified window or for the entire screen.</summary>
		/// <param name="hWnd">A handle to the window whose DC is to be retrieved. If this value is <b>NULL</b>, <b>GetDC</b> retrieves the DC for the entire screen.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is a handle to the DC for the specified window's client area. If the function fails, the return value is <b>NULL</b>.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <b>GetDC</b> function retrieves a common, class, or private DC depending on the class style of the specified window. For class and private DCs, <b>GetDC</b> leaves the previously assigned attributes unchanged. However, for common DCs, <b>GetDC</b> assigns default attributes to the DC each time it is retrieved. For example, the default font is System, which is a bitmap font. Because of this, the handle to a common DC returned by <b>GetDC</b> does not tell you what font, color, or brush was used when the window was drawn. To determine the font, call <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-gettextfacea">GetTextFace</a>. Note that the handle to the DC can only be used by a single thread at any one time. After painting with a common DC, the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-releasedc">ReleaseDC</a> function must be called to release the DC. Class and private DCs do not have to be released. <b>ReleaseDC</b> must be called from the same thread that called <b>GetDC</b>. The number of DCs is limited only by available memory.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getdc#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.HDC GetDC(winmdroot.Foundation.HWND hWnd);

		/// <summary>The GetDCEx function retrieves a handle to a device context (DC) for the client area of a specified window or for the entire screen.</summary>
		/// <param name="hWnd">A handle to the window whose DC is to be retrieved. If this value is <b>NULL</b>, <b>GetDCEx</b> retrieves the DC for the entire screen.</param>
		/// <param name="hrgnClip">A clipping region that may be combined with the visible region of the DC. If the value of <i>flags</i> is DCX_INTERSECTRGN or DCX_EXCLUDERGN, then the operating system assumes ownership of the region and will automatically delete it when it is no longer needed. In this case, the application should not use or delete the region after a successful call to <b>GetDCEx</b>.</param>
		/// <param name="flags"></param>
		/// <returns>
		/// <para>If the function succeeds, the return value is the handle to the DC for the specified window. If the function fails, the return value is <b>NULL</b>. An invalid value for the <i>hWnd</i> parameter will cause the function to fail.</para>
		/// </returns>
		/// <remarks>
		/// <para>Unless the display DC belongs to a window class, the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-releasedc">ReleaseDC</a> function must be called to release the DC after painting. Also, <b>ReleaseDC</b> must be called from the same thread that called <b>GetDCEx</b>. The number of DCs is limited only by available memory. The function returns a handle to a DC that belongs to the window's class if CS_CLASSDC, CS_OWNDC or CS_PARENTDC was specified as a style in the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-wndclassa">WNDCLASS</a> structure when the class was registered.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getdcex#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.HDC GetDCEx(winmdroot.Foundation.HWND hWnd, winmdroot.Graphics.Gdi.HRGN hrgnClip, winmdroot.Graphics.Gdi.GET_DCX_FLAGS flags);

		/// <summary>Retrieves a handle to the desktop window. The desktop window covers the entire screen. The desktop window is the area on top of which other windows are painted.</summary>
		/// <returns>
		/// <para>Type: <b>HWND</b> The return value is a handle to the desktop window.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getdesktopwindow">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.HWND GetDesktopWindow();

		/// <summary>Retrieves a handle to the foreground window (the window with which the user is currently working). The system assigns a slightly higher priority to the thread that creates the foreground window than it does to other threads.</summary>
		/// <returns>
		/// <para>Type: <b>HWND</b> The return value is a handle to the foreground window. The foreground window can be <b>NULL</b> in certain circumstances, such as when a window is losing activation.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getforegroundwindow">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.HWND GetForegroundWindow();

		/// <summary>Retrieves the count of handles to graphical user interface (GUI) objects in use by the specified process.</summary>
		/// <param name="hProcess">
		/// <para>A handle to the process. The handle must refer to a process in the current session, and must have the **PROCESS_QUERY_LIMITED_INFORMATION** access right (see [Process security and access rights](/windows/win32/procthread/process-security-and-access-rights)). If this parameter is the special value **GR_GLOBAL**, then the resource usage is reported across all processes in the current session. **Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:** The **GR_GLOBAL** value is not supported until Windows 7 and Windows Server 2008 R2. **Windows Server 2003 and Windows XP:** The handle must have the **PROCESS_QUERY_INFORMATION** access right.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getguiresources#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="uiFlags"></param>
		/// <returns>
		/// <para>If the function succeeds, the return value is the count of handles to GUI objects in use by the process. If no GUI objects are in use, the return value is zero. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>A process without a graphical user interface does not use GUI resources, therefore, <b>GetGuiResources</b> will return zero.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getguiresources#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.1.2600")]
		internal static uint GetGuiResources(winmdroot.Foundation.HANDLE hProcess, winmdroot.System.Threading.GET_GUI_RESOURCES_FLAGS uiFlags)
		{
			Marshal.SetLastSystemError(0);
			uint __retVal = LocalExternFunction(hProcess, uiFlags);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetGuiResources"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern uint LocalExternFunction(winmdroot.Foundation.HANDLE hProcess, winmdroot.System.Threading.GET_GUI_RESOURCES_FLAGS uiFlags);
		}

		/// <inheritdoc cref="GetIconInfo(winmdroot.UI.WindowsAndMessaging.HICON, winmdroot.UI.WindowsAndMessaging.ICONINFO*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetIconInfo(winmdroot.UI.WindowsAndMessaging.HICON hIcon, out winmdroot.UI.WindowsAndMessaging.ICONINFO piconinfo)
		{
			fixed (winmdroot.UI.WindowsAndMessaging.ICONINFO* piconinfoLocal = &piconinfo)
			{
				winmdroot.Foundation.BOOL __result = PInvokeCore.GetIconInfo(hIcon, piconinfoLocal);
				return __result;
			}
		}

		/// <summary>Retrieves information about the specified icon or cursor.</summary>
		/// <param name="hIcon">Type: <b>HICON</b></param>
		/// <param name="piconinfo">
		/// <para>Type: <b>PICONINFO</b> A pointer to an <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-iconinfo">ICONINFO</a> structure. The function fills in the structure's members.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-geticoninfo#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If the function succeeds, the return value is nonzero and the function fills in the members of the specified <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-iconinfo">ICONINFO</a> structure. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para><b>GetIconInfo</b> creates bitmaps for the <b>hbmMask</b> and <b>hbmColor</b> or members of <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-iconinfo">ICONINFO</a>. The calling application must manage these bitmaps and delete them when they are no longer necessary. <h3><a id="DPI_Virtualization"></a><a id="dpi_virtualization"></a><a id="DPI_VIRTUALIZATION"></a>DPI Virtualization</h3> This API does not participate in DPI virtualization. The output returned is not affected by the DPI of the calling thread.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-geticoninfo#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetIconInfo(winmdroot.UI.WindowsAndMessaging.HICON hIcon, winmdroot.UI.WindowsAndMessaging.ICONINFO* piconinfo)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.BOOL __retVal = LocalExternFunction(hIcon, piconinfo);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetIconInfo"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.UI.WindowsAndMessaging.HICON hIcon, winmdroot.UI.WindowsAndMessaging.ICONINFO* piconinfo);
		}

		/// <inheritdoc cref="GetMonitorInfo(winmdroot.Graphics.Gdi.HMONITOR, winmdroot.Graphics.Gdi.MONITORINFO*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetMonitorInfo(winmdroot.Graphics.Gdi.HMONITOR hMonitor, ref winmdroot.Graphics.Gdi.MONITORINFO lpmi)
		{
			fixed (winmdroot.Graphics.Gdi.MONITORINFO* lpmiLocal = &lpmi)
			{
				winmdroot.Foundation.BOOL __result = PInvokeCore.GetMonitorInfo(hMonitor, lpmiLocal);
				return __result;
			}
		}

		/// <summary>The GetMonitorInfo function retrieves information about a display monitor. (Unicode)</summary>
		/// <param name="hMonitor">A handle to the display monitor of interest.</param>
		/// <param name="lpmi">
		/// <para>A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-monitorinfo">MONITORINFO</a> or <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-monitorinfoexa">MONITORINFOEX</a> structure that receives information about the specified display monitor. You must set the <b>cbSize</b> member of the structure to sizeof(MONITORINFO) or sizeof(MONITORINFOEX) before calling the <b>GetMonitorInfo</b> function. Doing so lets the function determine the type of structure you are passing to it. The <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-monitorinfoexa">MONITORINFOEX</a> structure is a superset of the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-monitorinfo">MONITORINFO</a> structure. It has one additional member: a string that contains a name for the display monitor. Most applications have no use for a display monitor name, and so can save some bytes by using a <b>MONITORINFO</b> structure.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getmonitorinfow#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>> [!NOTE] > The winuser.h header defines GetMonitorInfo as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see [Conventions for Function Prototypes](/windows/win32/intl/conventions-for-function-prototypes).</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getmonitorinfow#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetMonitorInfoW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL GetMonitorInfo(winmdroot.Graphics.Gdi.HMONITOR hMonitor, winmdroot.Graphics.Gdi.MONITORINFO* lpmi);

		/// <summary>Retrieves the current color of the specified display element.</summary>
		/// <param name="nIndex">Type: <b>int</b></param>
		/// <returns>
		/// <para>Type: <b>DWORD</b> The function returns the red, green, blue (RGB) color value of the given element. If the <i>nIndex</i> parameter is out of range, the return value is zero. Because zero is also a valid RGB value, you cannot use <b>GetSysColor</b> to determine whether a system color is supported by the current platform. Instead, use the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getsyscolorbrush">GetSysColorBrush</a> function, which returns <b>NULL</b> if the color is not supported.</para>
		/// </returns>
		/// <remarks>
		/// <para>To display the component of the RGB  value, use the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-getrvalue">GetRValue</a>, <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-getgvalue">GetGValue</a>, and <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-getbvalue">GetBValue</a> macros. System colors for monochrome displays are usually interpreted as shades of gray. To paint with a system color brush, an application should use <c>GetSysColorBrush(nIndex)</code>, instead of <code>CreateSolidBrush(GetSysColor(nIndex))</c>, because <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getsyscolorbrush">GetSysColorBrush</a> returns a cached brush, instead of allocating a new one. Color is an important visual element of most user interfaces. For guidelines about using color in your applications, see <a href="https://docs.microsoft.com/windows/win32/uxguide/vis-color">Color - Win32</a> and <a href="https://docs.microsoft.com/windows/apps/design/signature-experiences/color">Color in Windows 11</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getsyscolor#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern uint GetSysColor(winmdroot.Graphics.Gdi.SYS_COLOR_INDEX nIndex);

		/// <summary>The GetSysColorBrush function retrieves a handle identifying a logical brush that corresponds to the specified color index.</summary>
		/// <param name="nIndex">A color index. This value corresponds to the color used to paint one of the window elements. See <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getsyscolor">GetSysColor</a> for system color index values.</param>
		/// <returns>The return value identifies a logical brush if the <i>nIndex</i> parameter is supported by the current platform. Otherwise, it returns <b>NULL</b>.</returns>
		/// <remarks>
		/// <para>A brush is a bitmap that the system uses to paint the interiors of filled shapes. An application can retrieve the current system colors by calling the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getsyscolor">GetSysColor</a> function. An application can set the current system colors by calling the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-setsyscolors">SetSysColors</a> function. An application must not register a window class for a window using a system brush. To register a window class with a system color, see the documentation of the <b>hbrBackground</b> member of the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-wndclassa">WNDCLASS</a> or <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-wndclassexa">WNDCLASSEX</a> structures. System color brushes track changes in system colors. In other words, when the user changes a system color, the associated system color brush automatically changes to the new color. To paint with a system color brush, an application should use <b>GetSysColorBrush</b> (nIndex) instead of <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-createsolidbrush">CreateSolidBrush</a> ( <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getsyscolor">GetSysColor</a> (nIndex)), because <b>GetSysColorBrush</b> returns a cached brush instead of allocating a new one. System color brushes are owned by the system so you don't need to destroy them. Although you don't need to delete the logical brush that <b>GetSysColorBrush</b> returns, no harm occurs by calling <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-deleteobject">DeleteObject</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getsyscolorbrush#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.HBRUSH GetSysColorBrush(winmdroot.Graphics.Gdi.SYS_COLOR_INDEX nIndex);

		/// <summary>Retrieves the specified system metric or system configuration setting.</summary>
		/// <param name="nIndex">Type: <b>int</b></param>
		/// <returns>
		/// <para>Type: <b>int</b> If the function succeeds, the return value is the requested system metric or configuration setting. If the function fails, the return value is 0. <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a> does not provide extended error information.</para>
		/// </returns>
		/// <remarks>
		/// <para>System metrics can vary from display to display. <b>GetSystemMetrics</b>(SM_CMONITORS) counts only visible display monitors. This is different from <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-enumdisplaymonitors">EnumDisplayMonitors</a>, which enumerates both visible display monitors and invisible  pseudo-monitors that are associated with mirroring drivers. An invisible pseudo-monitor is associated with a pseudo-device used to mirror application drawing for remoting or other purposes. The SM_ARRANGE setting specifies how the system arranges minimized windows, and consists of a starting position and a direction. The starting position can be one of the following values.</para>
		/// <para></para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getsystemmetrics#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern int GetSystemMetrics(winmdroot.UI.WindowsAndMessaging.SYSTEM_METRICS_INDEX nIndex);

		/// <inheritdoc cref="GetWindowRect(winmdroot.Foundation.HWND, winmdroot.Foundation.RECT*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetWindowRect(winmdroot.Foundation.HWND hWnd, out winmdroot.Foundation.RECT lpRect)
		{
			fixed (winmdroot.Foundation.RECT* lpRectLocal = &lpRect)
			{
				winmdroot.Foundation.BOOL __result = PInvokeCore.GetWindowRect(hWnd, lpRectLocal);
				return __result;
			}
		}

		/// <summary>Retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.</summary>
		/// <param name="hWnd">
		/// <para>Type: <b>HWND</b> A handle to the window.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowrect#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lpRect">
		/// <para>Type: <b>LPRECT</b> A pointer to a  <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that receives the screen coordinates of the upper-left and lower-right corners of the window.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowrect#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>In conformance with conventions for the <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure, the bottom-right coordinates of the returned rectangle are exclusive. In other words, the pixel at (<b>right</b>, <b>bottom</b>) lies immediately outside the rectangle. GetWindowRect is virtualized for DPI. In Windows Vista and later, the Window Rect now includes the area occupied by the drop shadow. Calling GetWindowRect will have different behavior depending on whether the window has ever been shown or not.  If the window has not been shown before, GetWindowRect will not include the area of the drop shadow. To get the window bounds excluding the drop shadow, use <a href="https://docs.microsoft.com/windows/win32/api/dwmapi/nf-dwmapi-dwmgetwindowattribute">DwmGetWindowAttribute</a>, specifying <b>DWMWA_EXTENDED_FRAME_BOUNDS</b>.  Note that unlike the Window Rect, the DWM Extended Frame Bounds are not adjusted for DPI.  Getting the extended frame bounds can only be done after the window has been shown at least once.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowrect#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL GetWindowRect(winmdroot.Foundation.HWND hWnd, winmdroot.Foundation.RECT* lpRect)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.BOOL __retVal = LocalExternFunction(hWnd, lpRect);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetWindowRect"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.HWND hWnd, winmdroot.Foundation.RECT* lpRect);
		}

		/// <summary>Copies the text of the specified window's title bar (if it has one) into a buffer. If the specified window is a control, the text of the control is copied. However, GetWindowText cannot retrieve the text of a control in another application. (Unicode)</summary>
		/// <param name="hWnd">
		/// <para>Type: <b>HWND</b> A handle to the window or control containing the text.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowtextw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lpString">
		/// <para>Type: <b>LPTSTR</b> The buffer that will receive the text. If the string is as long or longer than the buffer, the string is truncated and terminated with a null character.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowtextw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="nMaxCount">
		/// <para>Type: <b>int</b> The maximum number of characters to copy to the buffer, including the null character. If the text exceeds this limit, it is truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowtextw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>int</b> If the function succeeds, the return value is the length, in characters, of the copied string, not including the terminating null character. If the window has no title bar or text, if the title bar is empty, or if the window or control handle is invalid, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>. This function cannot retrieve the text of an edit control in another application.</para>
		/// </returns>
		/// <remarks>
		/// <para>If the target window is owned by the current process, <b>GetWindowText</b> causes a <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-gettext">WM_GETTEXT</a> message to be sent to the specified window or control. If the target window is owned by another process and has a caption, <b>GetWindowText</b> retrieves the window caption text. If the window does not have a caption, the return value is a null string. This behavior is by design. It allows applications to call <b>GetWindowText</b> without becoming unresponsive if the process that owns the target window is not responding. However, if the target window is not responding and it belongs to the calling application, <b>GetWindowText</b> will cause the calling application to become unresponsive. To retrieve the text of a control in another process, send a <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-gettext">WM_GETTEXT</a> message directly instead of calling <b>GetWindowText</b>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowtextw#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static int GetWindowText(winmdroot.Foundation.HWND hWnd, winmdroot.Foundation.PWSTR lpString, int nMaxCount)
		{
			Marshal.SetLastSystemError(0);
			int __retVal = LocalExternFunction(hWnd, lpString, nMaxCount);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetWindowTextW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern int LocalExternFunction(winmdroot.Foundation.HWND hWnd, winmdroot.Foundation.PWSTR lpString, int nMaxCount);
		}

		/// <summary>Retrieves the length, in characters, of the specified window's title bar text (if the window has a title bar). (Unicode)</summary>
		/// <param name="hWnd">
		/// <para>Type: <b>HWND</b> A handle to the window or control.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowtextlengthw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>int</b> If the function succeeds, the return value is the length, in characters, of the text. Under certain conditions, this value might be greater than the length of the text (see Remarks). If the window has no text, the return value is zero. Function failure is indicated by a return value of zero and a <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a> result that is nonzero. > [!NOTE] > This function does not clear the most recent error information. To determine success or failure, clear the most recent error information by calling <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-setlasterror">SetLastError</a> with 0, then call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>If the target window is owned by the current process, <b>GetWindowTextLength</b> causes a <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-gettextlength">WM_GETTEXTLENGTH</a> message to be sent to the specified window or control. Under certain conditions, the <b>GetWindowTextLength</b> function may return a value that is larger than the actual length of the text. This occurs with certain mixtures of ANSI and Unicode, and is due to the system allowing for the possible existence of double-byte character set (DBCS) characters within the text. The return value, however, will always be at least as large as the actual length of the text; you can thus always use it to guide buffer allocation. This behavior can occur when an application uses both ANSI functions and common dialogs, which use Unicode. It can also occur when an application uses the ANSI version of <b>GetWindowTextLength</b> with a window whose window procedure is Unicode, or the Unicode version of <b>GetWindowTextLength</b> with a window whose window procedure is ANSI. For more information on ANSI and ANSI functions, see <a href="https://docs.microsoft.com/windows/desktop/Intl/conventions-for-function-prototypes">Conventions for Function Prototypes</a>. To obtain the exact length of the text, use the <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-gettext">WM_GETTEXT</a>, <a href="https://docs.microsoft.com/windows/desktop/Controls/lb-gettext">LB_GETTEXT</a>, or <a href="https://docs.microsoft.com/windows/desktop/Controls/cb-getlbtext">CB_GETLBTEXT</a> messages, or the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getwindowtexta">GetWindowText</a> function.</para>
		/// <para>> [!NOTE] > The winuser.h header defines GetWindowTextLength as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see [Conventions for Function Prototypes](/windows/win32/intl/conventions-for-function-prototypes).</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowtextlengthw#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static int GetWindowTextLength(winmdroot.Foundation.HWND hWnd)
		{
			Marshal.SetLastSystemError(0);
			int __retVal = LocalExternFunction(hWnd);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "GetWindowTextLengthW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern int LocalExternFunction(winmdroot.Foundation.HWND hWnd);
		}

		/// <summary>Retrieves the identifier of the thread that created the specified window and, optionally, the identifier of the process that created the window.</summary>
		/// <param name="hWnd">
		/// <para>Type: <b>HWND</b> A handle to the window.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lpdwProcessId">
		/// <para>Type: <b>LPDWORD</b> A pointer to a variable that receives the process identifier. If this parameter is not <b>NULL</b>, <b>GetWindowThreadProcessId</b> copies the identifier of the process to the variable; otherwise, it does not. If the function fails, the value of the variable is unchanged.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>DWORD</b> If the function succeeds, the return value is the identifier of the thread that created the window. If the window handle is invalid, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe uint GetWindowThreadProcessId(winmdroot.Foundation.HWND hWnd, [Optional] uint* lpdwProcessId);

		/// <summary>Destroys a cursor and frees any memory the cursor occupied. Do not use this function to destroy a shared cursor.</summary>
		/// <param name="hCursor">
		/// <para>Type: <b>HCURSOR</b> A handle to the cursor to be destroyed. The cursor must not be in use.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-destroycursor#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <b>DestroyCursor</b> function destroys a nonshared cursor. Do not use this function to destroy a shared cursor. A shared cursor is valid as long as the module from which it was loaded remains in memory. The following functions obtain a shared cursor: </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-destroycursor#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static winmdroot.Foundation.BOOL DestroyCursor(winmdroot.UI.WindowsAndMessaging.HCURSOR hCursor)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.BOOL __retVal = LocalExternFunction(hCursor);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "DestroyCursor"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.UI.WindowsAndMessaging.HCURSOR hCursor);
		}

		/// <inheritdoc cref="LoadIcon(winmdroot.Foundation.HINSTANCE, winmdroot.Foundation.PCWSTR)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.UI.WindowsAndMessaging.HICON LoadIcon(winmdroot.Foundation.HINSTANCE hInstance, string lpIconName)
		{
			fixed (char* lpIconNameLocal = lpIconName)
			{
				winmdroot.UI.WindowsAndMessaging.HICON __result = PInvokeCore.LoadIcon(hInstance, lpIconNameLocal);
				return __result;
			}
		}

		/// <summary>Loads the specified icon resource from the executable (.exe) file associated with an application instance. (Unicode)</summary>
		/// <param name="hInstance">
		/// <para>Type: <b>HINSTANCE</b> A handle to an instance of the module whose executable file contains the icon to be loaded. This parameter must be <b>NULL</b> when a standard icon is being loaded.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-loadiconw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lpIconName">
		/// <para>Type: <b>LPCTSTR</b> The name of the icon resource to be loaded. Alternatively, this parameter can contain the resource identifier in the low-order word and zero in the high-order word. Use the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-makeintresourcea">MAKEINTRESOURCE</a> macro to create this value.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-loadiconw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>HICON</b> If the function succeeds, the return value is a handle to the newly loaded icon. If the function fails, the return value is <b>NULL</b>. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para><b>LoadIcon</b> loads the icon resource only if it has not been loaded; otherwise, it retrieves a handle to the existing resource. The function searches the icon resource for the icon most appropriate for the current display. The icon resource can be a color or monochrome bitmap. <b>LoadIcon</b> can only load an icon whose size conforms to the <b>SM_CXICON</b> and <b>SM_CYICON</b> system metric values. Use the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-loadimagea">LoadImage</a> function to load icons of other sizes.</para>
		/// <para>> [!NOTE] > The winuser.h header defines LoadIcon as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see [Conventions for Function Prototypes](/windows/win32/intl/conventions-for-function-prototypes).</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-loadiconw#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static winmdroot.UI.WindowsAndMessaging.HICON LoadIcon(winmdroot.Foundation.HINSTANCE hInstance, winmdroot.Foundation.PCWSTR lpIconName)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.UI.WindowsAndMessaging.HICON __retVal = LocalExternFunction(hInstance, lpIconName);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "LoadIconW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern winmdroot.UI.WindowsAndMessaging.HICON LocalExternFunction(winmdroot.Foundation.HINSTANCE hInstance, winmdroot.Foundation.PCWSTR lpIconName);
		}

		/// <inheritdoc cref="MapWindowPoints(winmdroot.Foundation.HWND, winmdroot.Foundation.HWND, global::System.Drawing.Point*, uint)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe int MapWindowPoints(winmdroot.Foundation.HWND hWndFrom, winmdroot.Foundation.HWND hWndTo, ReadOnlySpan<global::System.Drawing.Point> lpPoints)
		{
			fixed (global::System.Drawing.Point* lpPointsLocal = lpPoints)
			{
				int __result = PInvokeCore.MapWindowPoints(hWndFrom, hWndTo, lpPointsLocal, (uint )lpPoints.Length);
				return __result;
			}
		}

		/// <summary>The MapWindowPoints function converts (maps) a set of points from a coordinate space relative to one window to a coordinate space relative to another window.</summary>
		/// <param name="hWndFrom">A handle to the window from which points are converted. If this parameter is <b>NULL</b> or HWND_DESKTOP, the points are presumed to be in screen coordinates.</param>
		/// <param name="hWndTo">A handle to the window to which points are converted. If this parameter is <b>NULL</b> or HWND_DESKTOP, the points are converted to screen coordinates.</param>
		/// <param name="lpPoints">A pointer to an array of <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structures that contain the set of points to be converted. The points are in device units. This parameter can also point to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure, in which case the <i>cPoints</i> parameter should be set to 2.</param>
		/// <param name="cPoints">The number of <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structures in the array pointed to by the <i>lpPoints</i> parameter.</param>
		/// <returns>
		/// <para>If the function succeeds, the low-order word of the return value is the number of pixels added to the horizontal coordinate of each source point in order to compute the horizontal coordinate of each destination point. (In addition to that, if precisely one of <i>hWndFrom</i> and <i>hWndTo</i> is mirrored, then each resulting horizontal coordinate is multiplied by -1.) The high-order word is the number of pixels added to the vertical coordinate of each source point in order to compute the vertical coordinate of each destination point. If the function fails, the return value is zero. Call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-setlasterror">SetLastError</a> prior to calling this method to differentiate an error return value from a legitimate "0" return value.</para>
		/// </returns>
		/// <remarks>
		/// <para>If <i>hWndFrom</i> or <i>hWndTo</i> (or both) are mirrored windows (that is, have <b>WS_EX_LAYOUTRTL</b> extended style) and precisely two points are passed in <i>lpPoints</i>, <b>MapWindowPoints</b> will interpret those two points as a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> and possibly automatically swap the left and right fields of that rectangle to ensure that left is not greater than right. If any number of points other than 2 is passed in <i>lpPoints</i>, then <b>MapWindowPoints</b> will correctly map the coordinates of each of those points separately, so if you pass in a pointer to an array of more than one rectangle in <i>lpPoints</i>, the new rectangles may get their left field greater than right. Thus, to guarantee the correct transformation of rectangle coordinates, you must call <b>MapWindowPoints</b> with one <b>RECT</b> pointer at a time, as shown in the following example:</para>
		/// <para></para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-mapwindowpoints#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe int MapWindowPoints(winmdroot.Foundation.HWND hWndFrom, winmdroot.Foundation.HWND hWndTo, global::System.Drawing.Point* lpPoints, uint cPoints);

		/// <summary>The MonitorFromPoint function retrieves a handle to the display monitor that contains a specified point.</summary>
		/// <param name="pt">A <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structure that specifies the point of interest in virtual-screen coordinates.</param>
		/// <param name="dwFlags">Determines the function's return value if the point is not contained within any display monitor.</param>
		/// <returns>
		/// <para>If the point is contained by a display monitor, the return value is an <b>HMONITOR</b> handle to that display monitor. If the point is not contained by a display monitor, the return value depends on the value of <i>dwFlags</i>.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-monitorfrompoint">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.HMONITOR MonitorFromPoint(global::System.Drawing.Point pt, winmdroot.Graphics.Gdi.MONITOR_FROM_FLAGS dwFlags);

		/// <inheritdoc cref="MonitorFromRect(winmdroot.Foundation.RECT*, winmdroot.Graphics.Gdi.MONITOR_FROM_FLAGS)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Graphics.Gdi.HMONITOR MonitorFromRect(in winmdroot.Foundation.RECT lprc, winmdroot.Graphics.Gdi.MONITOR_FROM_FLAGS dwFlags)
		{
			fixed (winmdroot.Foundation.RECT* lprcLocal = &lprc)
			{
				winmdroot.Graphics.Gdi.HMONITOR __result = PInvokeCore.MonitorFromRect(lprcLocal, dwFlags);
				return __result;
			}
		}

		/// <summary>The MonitorFromRect function retrieves a handle to the display monitor that has the largest area of intersection with a specified rectangle.</summary>
		/// <param name="lprc">A pointer to a <a href="https://docs.microsoft.com/windows/desktop/api/windef/ns-windef-rect">RECT</a> structure that specifies the rectangle of interest in virtual-screen coordinates.</param>
		/// <param name="dwFlags">Determines the function's return value if the rectangle does not intersect any display monitor.</param>
		/// <returns>
		/// <para>If the rectangle intersects one or more display monitor rectangles, the return value is an <b>HMONITOR</b> handle to the display monitor that has the largest area of intersection with the rectangle. If the rectangle does not intersect a display monitor, the return value depends on the value of <i>dwFlags</i>.</para>
		/// </returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-monitorfromrect">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Graphics.Gdi.HMONITOR MonitorFromRect(winmdroot.Foundation.RECT* lprc, winmdroot.Graphics.Gdi.MONITOR_FROM_FLAGS dwFlags);

		/// <summary>The MonitorFromWindow function retrieves a handle to the display monitor that has the largest area of intersection with the bounding rectangle of a specified window.</summary>
		/// <param name="hwnd">A handle to the window of interest.</param>
		/// <param name="dwFlags">Determines the function's return value if the window does not intersect any display monitor.</param>
		/// <returns>
		/// <para>If the window intersects one or more display monitor rectangles, the return value is an <b>HMONITOR</b> handle to the display monitor that has the largest area of intersection with the window. If the window does not intersect a display monitor, the return value depends on the value of <i>dwFlags</i>.</para>
		/// </returns>
		/// <remarks>If the window is currently minimized, <b>MonitorFromWindow</b> uses the rectangle of the window before it was minimized.</remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Graphics.Gdi.HMONITOR MonitorFromWindow(winmdroot.Foundation.HWND hwnd, winmdroot.Graphics.Gdi.MONITOR_FROM_FLAGS dwFlags);

		/// <inheritdoc cref="PeekMessage(winmdroot.UI.WindowsAndMessaging.MSG*, winmdroot.Foundation.HWND, uint, uint, winmdroot.UI.WindowsAndMessaging.PEEK_MESSAGE_REMOVE_TYPE)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL PeekMessage(out winmdroot.UI.WindowsAndMessaging.MSG lpMsg, winmdroot.Foundation.HWND hWnd, uint wMsgFilterMin, uint wMsgFilterMax, winmdroot.UI.WindowsAndMessaging.PEEK_MESSAGE_REMOVE_TYPE wRemoveMsg)
		{
			fixed (winmdroot.UI.WindowsAndMessaging.MSG* lpMsgLocal = &lpMsg)
			{
				winmdroot.Foundation.BOOL __result = PInvokeCore.PeekMessage(lpMsgLocal, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg);
				return __result;
			}
		}

		/// <summary>Dispatches incoming nonqueued messages, checks the thread message queue for a posted message, and retrieves the message (if any exist). (Unicode)</summary>
		/// <param name="lpMsg">
		/// <para>Type: <b>LPMSG</b> A pointer to an <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-msg">MSG</a> structure that receives message information.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-peekmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="hWnd">
		/// <para>Type: <b>HWND</b> A handle to the window whose messages are to be retrieved. The window must belong to the current thread.</para>
		/// <para>If <i>hWnd</i> is <b>NULL</b>, <b>PeekMessage</b> retrieves messages for any window that belongs to the current thread, and any messages on the current thread's message queue whose <b>hwnd</b> value is <b>NULL</b> (see the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-msg">MSG</a> structure). Therefore if hWnd is <b>NULL</b>, both window messages and thread messages are processed. If <i>hWnd</i> is -1, <b>PeekMessage</b> retrieves only messages on the current thread's message queue whose <b>hwnd</b> value is <b>NULL</b>, that is, thread messages as posted by  <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-postmessagea">PostMessage</a> (when the <i>hWnd</i> parameter is <b>NULL</b>) or <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-postthreadmessagea">PostThreadMessage</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-peekmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="wMsgFilterMin">
		/// <para>Type: <b>UINT</b> The value of the first message in the range of messages to be examined. Use <b>WM_KEYFIRST</b> (0x0100) to specify the first keyboard message or <b>WM_MOUSEFIRST</b> (0x0200) to specify the first mouse message. If <i>wMsgFilterMin</i> and <i>wMsgFilterMax</i> are both zero, <b>PeekMessage</b> returns all available messages (that is, no range filtering is performed).</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-peekmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="wMsgFilterMax">
		/// <para>Type: <b>UINT</b> The value of the last message in the range of messages to be examined. Use <b>WM_KEYLAST</b> to specify the last keyboard message or <b>WM_MOUSELAST</b> to specify the last mouse message. If <i>wMsgFilterMin</i> and <i>wMsgFilterMax</i> are both zero, <b>PeekMessage</b> returns all available messages (that is, no range filtering is performed).</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-peekmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="wRemoveMsg">Type: <b>UINT</b></param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If a message is available, the return value is nonzero. If no messages are available, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para><b>PeekMessage</b> retrieves messages associated with the window identified by the <i>hWnd</i> parameter or any of its children as specified by the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-ischild">IsChild</a> function, and within the range of message values given by the <i>wMsgFilterMin</i> and <i>wMsgFilterMax</i> parameters. Note that an application can only use the low word in the <i>wMsgFilterMin</i> and <i>wMsgFilterMax</i> parameters; the high word is reserved for the system. Note that <b>PeekMessage</b> always retrieves <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-quit">WM_QUIT</a> messages, no matter which values you specify for <i>wMsgFilterMin</i> and <i>wMsgFilterMax</i>. During this call, the system dispatches (<a href="https://docs.microsoft.com/windows/win32/api/winuser/nf-winuser-dispatchmessage">DispatchMessage</a>) pending,  nonqueued messages, that is, messages sent to windows owned by the calling thread using the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-sendmessage">SendMessage</a>, <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-sendmessagecallbacka">SendMessageCallback</a>, <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-sendmessagetimeouta">SendMessageTimeout</a>, or <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-sendnotifymessagea">SendNotifyMessage</a> function. Then the first queued message that matches the specified filter is retrieved. The system may also process internal events. If no filter is specified, messages are processed in the following order: </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-peekmessagew#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "PeekMessageW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.BOOL PeekMessage(winmdroot.UI.WindowsAndMessaging.MSG* lpMsg, winmdroot.Foundation.HWND hWnd, uint wMsgFilterMin, uint wMsgFilterMax, winmdroot.UI.WindowsAndMessaging.PEEK_MESSAGE_REMOVE_TYPE wRemoveMsg);

		/// <summary>Places (posts) a message in the message queue associated with the thread that created the specified window and returns without waiting for the thread to process the message. (Unicode)</summary>
		/// <param name="hWnd">
		/// <para>Type: <b>HWND</b> A handle to the window whose window procedure is to receive the message. The following values have special meanings. </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-postmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="Msg">
		/// <para>Type: <b>UINT</b> The message to be posted. For lists of the system-provided messages, see <a href="https://docs.microsoft.com/windows/desktop/winmsg/about-messages-and-message-queues">System-Defined Messages</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-postmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="wParam">
		/// <para>Type: <b>WPARAM</b> Additional message-specific information.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-postmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lParam">
		/// <para>Type: <b>LPARAM</b> Additional message-specific information.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-postmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>When a message is blocked by UIPI the last error, retrieved with <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>, is set to 5 (access denied). Messages in a message queue are retrieved by calls to the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getmessage">GetMessage</a> or <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-peekmessagea">PeekMessage</a> function. Applications that need to communicate using <b>HWND_BROADCAST</b> should use the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-registerwindowmessagea">RegisterWindowMessage</a> function to obtain a unique message for inter-application communication. The system only does marshalling for system messages (those in the range 0 to (<a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-user">WM_USER</a>-1)). To send other messages (those &gt;= <b>WM_USER</b>) to another process, you must do custom marshalling. If you send a message in the range below <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-user">WM_USER</a> to the asynchronous message functions (<b>PostMessage</b>, <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-sendnotifymessagea">SendNotifyMessage</a>, and <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-sendmessagecallbacka">SendMessageCallback</a>), its message parameters cannot include pointers. Otherwise, the operation will fail. The functions will return before the receiving thread has had a chance to process the message and the sender will free the memory before it is used. Do not post the <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-quit">WM_QUIT</a> message using <b>PostMessage</b>; use the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-postquitmessage">PostQuitMessage</a> function. An accessibility application can use <b>PostMessage</b> to post <a href="https://docs.microsoft.com/windows/desktop/inputdev/wm-appcommand">WM_APPCOMMAND</a> messages  to the shell to launch applications. This  functionality is not guaranteed to work for other types of applications. There is a limit of 10,000 posted messages per message queue. This limit should be sufficiently large.  If your application exceeds the limit, it should be redesigned to avoid consuming so many system resources. To adjust this limit, modify the following registry key. <pre><b>HKEY_LOCAL_MACHINE</b> <b>SOFTWARE</b> <b>Microsoft</b> <b>Windows NT</b> <b>CurrentVersion</b> <b>Windows</b> <b>USERPostMessageLimit</b></pre> If the function fails, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a> to get extended error information. <b>GetLastError</b> returns <b>ERROR_NOT_ENOUGH_QUOTA</b> when the limit is hit. The minimum acceptable value is 4000.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-postmessagew#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static winmdroot.Foundation.BOOL PostMessage(winmdroot.Foundation.HWND hWnd, uint Msg, winmdroot.Foundation.WPARAM wParam, winmdroot.Foundation.LPARAM lParam)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.BOOL __retVal = LocalExternFunction(hWnd, Msg, wParam, lParam);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "PostMessageW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.HWND hWnd, uint Msg, winmdroot.Foundation.WPARAM wParam, winmdroot.Foundation.LPARAM lParam);
		}

		/// <inheritdoc cref="RegisterClipboardFormat(winmdroot.Foundation.PCWSTR)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe uint RegisterClipboardFormat(string lpszFormat)
		{
			fixed (char* lpszFormatLocal = lpszFormat)
			{
				uint __result = PInvokeCore.RegisterClipboardFormat(lpszFormatLocal);
				return __result;
			}
		}

		/// <summary>Registers a new clipboard format. This format can then be used as a valid clipboard format. (Unicode)</summary>
		/// <param name="lpszFormat">
		/// <para>Type: <b>LPCTSTR</b> The name of the new format.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-registerclipboardformatw#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>UINT</b> If the function succeeds, the return value identifies the registered clipboard format. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>If a registered format with the specified name already exists, a new format is not registered and the return value identifies the existing format. This enables more than one application to copy and paste data using the same registered clipboard format. Note that the format name comparison is case-insensitive. Registered clipboard formats are identified by values in the range 0xC000 through 0xFFFF. When registered clipboard formats are placed on or retrieved from the clipboard, they must be in the form of an <b>HGLOBAL</b> value.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-registerclipboardformatw#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static uint RegisterClipboardFormat(winmdroot.Foundation.PCWSTR lpszFormat)
		{
			Marshal.SetLastSystemError(0);
			uint __retVal = LocalExternFunction(lpszFormat);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "RegisterClipboardFormatW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern uint LocalExternFunction(winmdroot.Foundation.PCWSTR lpszFormat);
		}

		/// <summary>The ReleaseDC function releases a device context (DC), freeing it for use by other applications. The effect of the ReleaseDC function depends on the type of DC. It frees only common and window DCs. It has no effect on class or private DCs.</summary>
		/// <param name="hWnd">A handle to the window whose DC is to be released.</param>
		/// <param name="hDC">A handle to the DC to be released.</param>
		/// <returns>
		/// <para>The return value indicates whether the DC was released. If the DC was released, the return value is 1. If the DC was not released, the return value is zero.</para>
		/// </returns>
		/// <remarks>
		/// <para>The application must call the <b>ReleaseDC</b> function for each call to the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getwindowdc">GetWindowDC</a> function and for each call to the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getdc">GetDC</a> function that retrieves a common DC. An application cannot use the <b>ReleaseDC</b> function to release a DC that was created by calling the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-createdca">CreateDC</a> function; instead, it must use the <a href="https://docs.microsoft.com/windows/desktop/api/wingdi/nf-wingdi-deletedc">DeleteDC</a> function. <b>ReleaseDC</b> must be called from the same thread that called <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-getdc">GetDC</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-releasedc#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern int ReleaseDC(winmdroot.Foundation.HWND hWnd, winmdroot.Graphics.Gdi.HDC hDC);

		/// <summary>Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window and does not return until the window procedure has processed the message. (SendMessageW)</summary>
		/// <param name="hWnd">
		/// <para>Type: <b>HWND</b> A handle to the window whose window procedure will receive the message. If this parameter is <b>HWND_BROADCAST</b> ((HWND)0xffff), the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows. Message sending is subject to UIPI. The thread of a process can send messages only to message queues of threads in processes of lesser or equal integrity level.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-sendmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="Msg">
		/// <para>Type: <b>UINT</b> The message to be sent. For lists of the system-provided messages, see <a href="https://docs.microsoft.com/windows/desktop/winmsg/about-messages-and-message-queues">System-Defined Messages</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-sendmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="wParam">
		/// <para>Type: <b>WPARAM</b> Additional message-specific information.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-sendmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="lParam">
		/// <para>Type: <b>LPARAM</b> Additional message-specific information.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-sendmessagew#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>LRESULT</b> The return value specifies the result of the message processing; it depends on the message sent.</para>
		/// </returns>
		/// <remarks>
		/// <para>When a message is blocked by UIPI the last error, retrieved with <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>, is set to 5 (access denied). Applications that need to communicate using <b>HWND_BROADCAST</b> should use the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-registerwindowmessagea">RegisterWindowMessage</a> function to obtain a unique message for inter-application communication. The system only does marshalling for system messages (those in the range 0 to (<a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-user">WM_USER</a>-1)). To send other messages (those &gt;= <b>WM_USER</b>) to another process, you must do custom marshalling. If the specified window was created by the calling thread, the window procedure is called immediately as a subroutine. If the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure. Messages sent between threads are processed only when the receiving thread executes message retrieval code. The sending thread is blocked until the receiving thread processes the message. However, the sending thread will process incoming nonqueued messages while waiting for its message to be processed. To prevent this, use <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-sendmessagetimeouta">SendMessageTimeout</a> with SMTO_BLOCK set. For more information on nonqueued messages, see <a href="https://docs.microsoft.com/windows/desktop/winmsg/about-messages-and-message-queues">Nonqueued Messages</a>. An accessibility application can use <b>SendMessage</b> to send <a href="https://docs.microsoft.com/windows/desktop/inputdev/wm-appcommand">WM_APPCOMMAND</a> messages  to the shell to launch applications. This  functionality is not guaranteed to work for other types of applications.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-sendmessagew#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static winmdroot.Foundation.LRESULT SendMessage(winmdroot.Foundation.HWND hWnd, uint Msg, winmdroot.Foundation.WPARAM wParam, winmdroot.Foundation.LPARAM lParam)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.LRESULT __retVal = LocalExternFunction(hWnd, Msg, wParam, lParam);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "SendMessageW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern winmdroot.Foundation.LRESULT LocalExternFunction(winmdroot.Foundation.HWND hWnd, uint Msg, winmdroot.Foundation.WPARAM wParam, winmdroot.Foundation.LPARAM lParam);
		}

		/// <summary>Retrieves or sets the value of one of the system-wide parameters. (Unicode)</summary>
		/// <param name="uiAction">
		/// <para>Type: <b>UINT</b> The system-wide parameter to be retrieved or set. The possible values are organized in the following tables of related parameters: </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-systemparametersinfow#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="uiParam">
		/// <para>Type: <b>UINT</b> A parameter whose usage and format depends on the system parameter being queried or set. For more information about system-wide parameters, see the <i>uiAction</i> parameter. If not otherwise indicated, you must specify zero for this parameter.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-systemparametersinfow#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="pvParam">
		/// <para>Type: <b>PVOID</b> A parameter whose usage and format depends on the system parameter being queried or set. For more information about system-wide parameters, see the <i>uiAction</i> parameter. If not otherwise indicated, you must specify <b>NULL</b> for this parameter. For information on the <b>PVOID</b> datatype, see <a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">Windows Data Types</a>.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-systemparametersinfow#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <param name="fWinIni">
		/// <para>Type: <b>UINT</b> If a system parameter is being set, specifies whether the user profile is to be updated, and if so, whether the <a href="https://docs.microsoft.com/windows/desktop/winmsg/wm-settingchange">WM_SETTINGCHANGE</a> message is to be broadcast to all top-level windows to notify them of the change.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-systemparametersinfow#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>
		/// <para>Type: <b>BOOL</b> If the function succeeds, the return value is a nonzero value. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>This function is intended for use with applications that allow the user to customize the environment. A keyboard layout name should be derived from the hexadecimal value of the language identifier corresponding to the layout. For example, U.S. English has a language identifier of 0x0409, so the primary U.S. English layout is named "00000409". Variants of U.S. English layout, such as the Dvorak layout, are named "00010409", "00020409" and so on. For a list of the primary language identifiers and sublanguage identifiers that make up a language identifier, see the <b>MAKELANGID</b> macro. There is a difference between the High Contrast color scheme and the High Contrast Mode. The High Contrast color scheme changes the system colors to colors that have obvious contrast; you switch to this color scheme by using the Display Options in the control panel. The High Contrast Mode, which uses <b>SPI_GETHIGHCONTRAST</b> and <b>SPI_SETHIGHCONTRAST</b>, advises applications to modify their appearance for visually-impaired users. It involves such things as audible warning to users and customized color scheme (using the Accessibility Options in the control panel). For more information, see <a href="https://docs.microsoft.com/windows/desktop/api/winuser/ns-winuser-highcontrasta">HIGHCONTRAST</a>. For more information on general accessibility features, see <a href="https://docs.microsoft.com/windows/desktop/accessibility">Accessibility</a>. During the time that the primary button is held down to activate the Mouse ClickLock feature, the user can move the mouse. After the primary button is locked down, releasing the primary button does not result in a <b>WM_LBUTTONUP</b> message. Thus, it will appear to an application that the primary button is still down. Any subsequent button message releases the primary button, sending a <b>WM_LBUTTONUP</b> message to the application, thus the button can be unlocked programmatically or through the user clicking any button. This API is not DPI aware, and should not be used if the calling thread is per-monitor DPI aware. For the DPI-aware version of this API, see <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-systemparametersinfofordpi">SystemParametersInfoForDPI</a>. For more information on DPI awareness, see <a href="https://docs.microsoft.com/windows/desktop/hidpi/high-dpi-desktop-application-development-on-windows">the Windows High DPI documentation.</a></para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-systemparametersinfow#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.BOOL SystemParametersInfo(winmdroot.UI.WindowsAndMessaging.SYSTEM_PARAMETERS_INFO_ACTION uiAction, uint uiParam, [Optional] void* pvParam, winmdroot.UI.WindowsAndMessaging.SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS fWinIni)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.BOOL __retVal = LocalExternFunction(uiAction, uiParam, pvParam, fWinIni);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "SystemParametersInfoW"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.UI.WindowsAndMessaging.SYSTEM_PARAMETERS_INFO_ACTION uiAction, uint uiParam, [Optional] void* pvParam, winmdroot.UI.WindowsAndMessaging.SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS fWinIni);
		}

		/// <summary>Retrieves the value of one of the system-wide parameters, taking into account the provided DPI value.</summary>
		/// <param name="uiAction">The system-wide parameter to be retrieved. This function is only intended for use with <b>SPI_GETICONTITLELOGFONT</b>, <b>SPI_GETICONMETRICS</b>, or <b>SPI_GETNONCLIENTMETRICS</b>. See <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-systemparametersinfoa">SystemParametersInfo</a> for more information on these values.</param>
		/// <param name="uiParam">A parameter whose usage and format depends on the system parameter being queried. For more information about system-wide parameters, see the <i>uiAction</i> parameter. If not otherwise indicated, you must specify zero for this parameter.</param>
		/// <param name="pvParam">A parameter whose usage and format depends on the system parameter being queried. For more information about system-wide parameters, see the <i>uiAction</i> parameter. If not otherwise indicated, you must specify <b>NULL</b> for this parameter. For information on the <b>PVOID</b> datatype, see <a href="https://docs.microsoft.com/windows/desktop/WinProg/windows-data-types">Windows Data Types</a>.</param>
		/// <param name="fWinIni">Has no effect for with this API. This parameter only has an effect if you're setting parameter.</param>
		/// <param name="dpi">The DPI to use for scaling the metric.</param>
		/// <returns>
		/// <para>If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call <a href="https://docs.microsoft.com/windows/desktop/api/errhandlingapi/nf-errhandlingapi-getlasterror">GetLastError</a>.</para>
		/// </returns>
		/// <remarks>
		/// <para>This function returns a similar result as <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-systemparametersinfoa">SystemParametersInfo</a>, but scales it according to an arbitrary DPI you provide (if appropriate). It only scales with the following possible values for <i>uiAction</i>: <b>SPI_GETICONTITLELOGFONT</b>, <b>SPI_GETICONMETRICS</b>, <b>SPI_GETNONCLIENTMETRICS</b>. Other possible <i>uiAction</i> values do not provide ForDPI behavior, and therefore this function returns 0 if called with them. For <i>uiAction</i> values that contain strings within their associated structures, only Unicode (<a href="https://docs.microsoft.com/windows/desktop/api/wingdi/ns-wingdi-logfonta">LOGFONTW</a>) strings are supported in this function.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-systemparametersinfofordpi#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[SupportedOSPlatform("windows10.0.14393")]
		internal static unsafe winmdroot.Foundation.BOOL SystemParametersInfoForDpi(uint uiAction, uint uiParam, [Optional] void* pvParam, uint fWinIni, uint dpi)
		{
			Marshal.SetLastSystemError(0);
			winmdroot.Foundation.BOOL __retVal = LocalExternFunction(uiAction, uiParam, pvParam, fWinIni, dpi);
			Marshal.SetLastPInvokeError(Marshal.GetLastSystemError());
			return __retVal;

			[DllImport("USER32.dll", ExactSpelling = true, EntryPoint = "SystemParametersInfoForDpi"),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
			static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(uint uiAction, uint uiParam, [Optional] void* pvParam, uint fWinIni, uint dpi);
		}

		/// <summary>The WindowFromDC function returns a handle to the window associated with the specified display device context (DC). Output functions that use the specified device context draw into this window.</summary>
		/// <param name="hDC">Handle to the device context from which a handle to the associated window is to be retrieved.</param>
		/// <returns>The return value is a handle to the window associated with the specified DC. If no window is associated with the specified DC, the return value is <b>NULL</b>.</returns>
		/// <remarks>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/winuser/nf-winuser-windowfromdc">Learn more about this API from docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("USER32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.HWND WindowFromDC(winmdroot.Graphics.Gdi.HDC hDC);
	}
}