6 instantiations of HANDLE
System.Private.Windows.Core (6)
_generated\122\Windows.Win32.HWND.g.cs (1)
61 public static implicit operator HANDLE(HWND value) => new HANDLE(value.Value);
_generated\98\Windows.Win32.HANDLE.g.cs (3)
41 public static explicit operator HANDLE(void* value) => new HANDLE(value); 57 public static explicit operator HANDLE(IntPtr value) => new HANDLE((void*)value.ToPointer()); 59 public static explicit operator HANDLE(UIntPtr value) => new HANDLE((void*)value.ToPointer());
Windows\Win32\UI\WindowsAndMessaging\HCURSOR.cs (1)
12public static implicit operator HANDLE(HCURSOR handle) => new((nint)handle);
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (1)
12public static implicit operator HANDLE(HICON handle) => new((nint)handle);
132 references to HANDLE
System.Drawing.Common (2)
System\Drawing\BufferedGraphicsContext.cs (1)
409hbitmap = PInvokeCore.CreateDIBSection(hdc, bitmapInfo, DIB_USAGE.DIB_RGB_COLORS, &pvBits, HANDLE.Null, 0);
System\Drawing\Graphics.cs (1)
102Gdip.CheckStatus(PInvokeGdiPlus.GdipCreateFromHDC2((HDC)hdc, (HANDLE)hdevice, &nativeGraphics));
System.Private.Windows.Core (36)
_generated\122\Windows.Win32.HWND.g.cs (1)
61 public static implicit operator HANDLE(HWND value) => new HANDLE(value.Value);
_generated\195\Windows.Win32.PInvokeCore.GDI32.dll.g.cs (4)
203 /// <inheritdoc cref="CreateDIBSection(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.BITMAPINFO*, winmdroot.Graphics.Gdi.DIB_USAGE, void**, winmdroot.Foundation.HANDLE, uint)"/> 206 internal static unsafe winmdroot.Graphics.Gdi.HBITMAP CreateDIBSection([Optional] winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.BITMAPINFO* pbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage, out void* ppvBits, [Optional] winmdroot.Foundation.HANDLE hSection, uint offset) 238 internal static unsafe winmdroot.Graphics.Gdi.HBITMAP CreateDIBSection([Optional] winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.BITMAPINFO* pbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage, void** ppvBits, [Optional] winmdroot.Foundation.HANDLE hSection, uint offset) 246 static extern unsafe winmdroot.Graphics.Gdi.HBITMAP LocalExternFunction([Optional] winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.BITMAPINFO* pbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage, void** ppvBits, [Optional] winmdroot.Foundation.HANDLE hSection, uint offset);
_generated\197\Windows.Win32.PInvokeCore.KERNEL32.dll.g.cs (2)
38 internal static winmdroot.Foundation.BOOL CloseHandle(winmdroot.Foundation.HANDLE hObject) 46 static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.HANDLE hObject);
_generated\198\Windows.Win32.PInvokeCore.OLE32.dll.g.cs (2)
113 internal static extern winmdroot.Foundation.HANDLE OleDuplicateData(winmdroot.Foundation.HANDLE hSrc, winmdroot.System.Ole.CLIPBOARD_FORMAT cfFormat, winmdroot.System.Memory.GLOBAL_ALLOC_FLAGS uiFlags);
_generated\201\Windows.Win32.PInvokeCore.USER32.dll.g.cs (7)
110 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) 113 winmdroot.Foundation.HANDLE __retVal = LocalExternFunction(h, type, cx, cy, flags); 118 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); 504 internal static uint GetGuiResources(winmdroot.Foundation.HANDLE hProcess, winmdroot.System.Threading.GET_GUI_RESOURCES_FLAGS uiFlags) 512 static extern uint LocalExternFunction(winmdroot.Foundation.HANDLE hProcess, winmdroot.System.Threading.GET_GUI_RESOURCES_FLAGS uiFlags);
_generated\98\Windows.Win32.HANDLE.g.cs (13)
25 : IEquatable<HANDLE> 35 internal static HANDLE Null => default; 39 public static implicit operator void*(HANDLE value) => value.Value; 41 public static explicit operator HANDLE(void* value) => new HANDLE(value); 43 public static bool operator ==(HANDLE left, HANDLE right) => left.Value == right.Value; 45 public static bool operator !=(HANDLE left, HANDLE right) => !(left == right); 47 public bool Equals(HANDLE other) => this.Value == other.Value; 49 public override bool Equals(object obj) => obj is HANDLE other && this.Equals(other); 55 public static implicit operator IntPtr(HANDLE value) => new IntPtr(value.Value); 57 public static explicit operator HANDLE(IntPtr value) => new HANDLE((void*)value.ToPointer()); 59 public static explicit operator HANDLE(UIntPtr value) => new HANDLE((void*)value.ToPointer());
System\Private\Windows\Ole\DragDropFormat.cs (1)
69(HANDLE)(nint)mediumSource.hGlobal,
Windows\Win32\PInvokeCore.CopyImage.cs (2)
8/// <inheritdoc cref="CopyImage(HANDLE, GDI_IMAGE_TYPE, int, int, IMAGE_FLAGS)"/> 17/// <inheritdoc cref="CopyImage(HANDLE, GDI_IMAGE_TYPE, int, int, IMAGE_FLAGS)"/>
Windows\Win32\UI\WindowsAndMessaging\HCURSOR.cs (2)
11public static explicit operator HCURSOR(HANDLE handle) => new((nint)handle); 12public static implicit operator HANDLE(HCURSOR handle) => new((nint)handle);
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (2)
11public static explicit operator HICON(HANDLE handle) => new((nint)handle); 12public static implicit operator HANDLE(HICON handle) => new((nint)handle);
System.Private.Windows.GdiPlus (4)
_generated\60\Windows.Win32.PInvokeGdiPlus.gdiplus.dll.g.cs (3)
1176 /// <inheritdoc cref="GdipCreateFromHDC2(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.HANDLE, winmdroot.Graphics.GdiPlus.GpGraphics**)"/> 1178 internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFromHDC2(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.HANDLE hDevice, ref winmdroot.Graphics.GdiPlus.GpGraphics* graphics) 1188 internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFromHDC2(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.HANDLE hDevice, winmdroot.Graphics.GdiPlus.GpGraphics** graphics);
System\Drawing\IIconExtensions.cs (1)
22(HANDLE)icon.Handle,
System.Windows.Forms (16)
System\Windows\Forms\Application.ThreadContext.cs (8)
19internal abstract unsafe partial class ThreadContext : MarshalByRefObject, IHandle<HANDLE> 46private HANDLE _handle; 73HANDLE target; 302_handle = HANDLE.Null; 459_handle = HANDLE.Null; 519public HANDLE Handle => _handle; 521HANDLE IHandle<HANDLE>.Handle => Handle;
System\Windows\Forms\Control.cs (1)
3562HANDLE threadHandle = ctx.Handle;
System\Windows\Forms\Input\Cursor.cs (5)
20public sealed class Cursor : IDisposable, ISerializable, IHandle<HICON>, IHandle<HANDLE>, IHandle<HCURSOR> 216HANDLE IHandle<HANDLE>.Handle => (HANDLE)Handle; 422(HANDLE)cursorHandle.Value,
System\Windows\Forms\NativeWindow.cs (1)
114PInvoke.GetExitCodeThread((HANDLE)threadHandle, &exitCode);
System\Windows\Forms\SystemInformation.cs (1)
501(HANDLE)hwinsta.Value,
System.Windows.Forms.Primitives (74)
_generated\24\Windows.Win32.CLIENTCREATESTRUCT.g.cs (1)
34 internal winmdroot.Foundation.HANDLE hWindowMenu;
_generated\409\Windows.Win32.PInvoke.api-ms-win-shcore-scaling-l1-1-1.dll.g.cs (3)
26 /// <inheritdoc cref="GetProcessDpiAwareness(winmdroot.Foundation.HANDLE, winmdroot.UI.HiDpi.PROCESS_DPI_AWARENESS*)"/> 29 internal static unsafe winmdroot.Foundation.HRESULT GetProcessDpiAwareness([Optional] winmdroot.Foundation.HANDLE hprocess, out winmdroot.UI.HiDpi.PROCESS_DPI_AWARENESS value) 51 internal static extern unsafe winmdroot.Foundation.HRESULT GetProcessDpiAwareness([Optional] winmdroot.Foundation.HANDLE hprocess, winmdroot.UI.HiDpi.PROCESS_DPI_AWARENESS* value);
_generated\417\Windows.Win32.PInvoke.KERNEL32.dll.g.cs (44)
27 /// <inheritdoc cref="ActivateActCtx(winmdroot.Foundation.HANDLE, nuint*)"/> 30 internal static unsafe winmdroot.Foundation.BOOL ActivateActCtx([Optional] winmdroot.Foundation.HANDLE hActCtx, out nuint lpCookie) 39 /// <inheritdoc cref="ActivateActCtx(winmdroot.Foundation.HANDLE, nuint*)"/> 45 winmdroot.Foundation.BOOL __result = PInvoke.ActivateActCtx(default(winmdroot.Foundation.HANDLE ), lpCookieLocal); 64 internal static unsafe winmdroot.Foundation.BOOL ActivateActCtx([Optional] winmdroot.Foundation.HANDLE hActCtx, nuint* lpCookie) 72 static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction([Optional] winmdroot.Foundation.HANDLE hActCtx, nuint* lpCookie); 86 internal static winmdroot.Foundation.BOOL CloseHandle(winmdroot.Foundation.HANDLE hObject) 94 static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.HANDLE hObject); 100 internal static unsafe winmdroot.Foundation.HANDLE CreateActCtx(in winmdroot.System.ApplicationInstallationAndServicing.ACTCTXW pActCtx) 104 winmdroot.Foundation.HANDLE __result = PInvoke.CreateActCtx(pActCtxLocal); 123 internal static unsafe winmdroot.Foundation.HANDLE CreateActCtx(winmdroot.System.ApplicationInstallationAndServicing.ACTCTXW* pActCtx) 126 winmdroot.Foundation.HANDLE __retVal = LocalExternFunction(pActCtx); 131 static extern unsafe winmdroot.Foundation.HANDLE LocalExternFunction(winmdroot.System.ApplicationInstallationAndServicing.ACTCTXW* pActCtx); 161 /// <inheritdoc cref="DuplicateHandle(winmdroot.Foundation.HANDLE, winmdroot.Foundation.HANDLE, winmdroot.Foundation.HANDLE, winmdroot.Foundation.HANDLE*, uint, winmdroot.Foundation.BOOL, winmdroot.Foundation.DUPLICATE_HANDLE_OPTIONS)"/> 164 internal static unsafe winmdroot.Foundation.BOOL DuplicateHandle(winmdroot.Foundation.HANDLE hSourceProcessHandle, winmdroot.Foundation.HANDLE hSourceHandle, winmdroot.Foundation.HANDLE hTargetProcessHandle, out winmdroot.Foundation.HANDLE lpTargetHandle, uint dwDesiredAccess, winmdroot.Foundation.BOOL bInheritHandle, winmdroot.Foundation.DUPLICATE_HANDLE_OPTIONS dwOptions) 166 fixed (winmdroot.Foundation.HANDLE* lpTargetHandleLocal = &lpTargetHandle) 206 internal static unsafe winmdroot.Foundation.BOOL DuplicateHandle(winmdroot.Foundation.HANDLE hSourceProcessHandle, winmdroot.Foundation.HANDLE hSourceHandle, winmdroot.Foundation.HANDLE hTargetProcessHandle, winmdroot.Foundation.HANDLE* lpTargetHandle, uint dwDesiredAccess, winmdroot.Foundation.BOOL bInheritHandle, winmdroot.Foundation.DUPLICATE_HANDLE_OPTIONS dwOptions) 214 static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.HANDLE hSourceProcessHandle, winmdroot.Foundation.HANDLE hSourceHandle, winmdroot.Foundation.HANDLE hTargetProcessHandle, winmdroot.Foundation.HANDLE* lpTargetHandle, uint dwDesiredAccess, winmdroot.Foundation.BOOL bInheritHandle, winmdroot.Foundation.DUPLICATE_HANDLE_OPTIONS dwOptions); 283 /// <inheritdoc cref="GetCurrentActCtx(winmdroot.Foundation.HANDLE*)"/> 286 internal static unsafe winmdroot.Foundation.BOOL GetCurrentActCtx(out winmdroot.Foundation.HANDLE lphActCtx) 288 fixed (winmdroot.Foundation.HANDLE* lphActCtxLocal = &lphActCtx) 305 internal static unsafe winmdroot.Foundation.BOOL GetCurrentActCtx(winmdroot.Foundation.HANDLE* lphActCtx) 313 static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.HANDLE* lphActCtx); 324 internal static extern winmdroot.Foundation.HANDLE GetCurrentProcess(); 341 internal static extern winmdroot.Foundation.HANDLE GetCurrentThread(); 343 /// <inheritdoc cref="GetExitCodeThread(winmdroot.Foundation.HANDLE, uint*)"/> 346 internal static unsafe winmdroot.Foundation.BOOL GetExitCodeThread(winmdroot.Foundation.HANDLE hThread, out uint lpExitCode) 370 internal static unsafe winmdroot.Foundation.BOOL GetExitCodeThread(winmdroot.Foundation.HANDLE hThread, uint* lpExitCode) 378 static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.HANDLE hThread, uint* lpExitCode); 659 /// <inheritdoc cref="LoadLibraryEx(winmdroot.Foundation.PCWSTR, winmdroot.Foundation.HANDLE, winmdroot.System.LibraryLoader.LOAD_LIBRARY_FLAGS)"/> 689 internal static winmdroot.Foundation.HMODULE LoadLibraryEx(winmdroot.Foundation.PCWSTR lpLibFileName, [Optional] winmdroot.Foundation.HANDLE hFile, winmdroot.System.LibraryLoader.LOAD_LIBRARY_FLAGS dwFlags) 697 static extern winmdroot.Foundation.HMODULE LocalExternFunction(winmdroot.Foundation.PCWSTR lpLibFileName, [Optional] winmdroot.Foundation.HANDLE hFile, winmdroot.System.LibraryLoader.LOAD_LIBRARY_FLAGS dwFlags);
_generated\422\Windows.Win32.PInvoke.SHELL32.dll.g.cs (4)
251 /// <inheritdoc cref="SHGetKnownFolderPath(global::System.Guid*, winmdroot.UI.Shell.KNOWN_FOLDER_FLAG, winmdroot.Foundation.HANDLE, winmdroot.Foundation.PWSTR*)"/> 254 internal static unsafe winmdroot.Foundation.HRESULT SHGetKnownFolderPath(in global::System.Guid rfid, winmdroot.UI.Shell.KNOWN_FOLDER_FLAG dwFlags, [Optional] winmdroot.Foundation.HANDLE hToken, out winmdroot.Foundation.PWSTR ppszPath) 290 internal static unsafe winmdroot.Foundation.HRESULT SHGetKnownFolderPath(global::System.Guid* rfid, winmdroot.UI.Shell.KNOWN_FOLDER_FLAG dwFlags, [Optional] winmdroot.Foundation.HANDLE hToken, winmdroot.Foundation.PWSTR* ppszPath) 296 static extern unsafe winmdroot.Foundation.HRESULT LocalExternFunction(global::System.Guid* rfid, uint dwFlags, [Optional] winmdroot.Foundation.HANDLE hToken, winmdroot.Foundation.PWSTR* ppszPath);
_generated\425\Windows.Win32.PInvoke.USER32.dll.g.cs (11)
2002 /// <inheritdoc cref="GetUserObjectInformation(winmdroot.Foundation.HANDLE, winmdroot.System.StationsAndDesktops.USER_OBJECT_INFORMATION_INDEX, void*, uint, uint*)"/> 2004 internal static unsafe winmdroot.Foundation.BOOL GetUserObjectInformation(winmdroot.Foundation.HANDLE hObj, winmdroot.System.StationsAndDesktops.USER_OBJECT_INFORMATION_INDEX nIndex, [Optional] Span<byte> pvInfo, out uint lpnLengthNeeded) 2016 /// <inheritdoc cref="GetUserObjectInformation(winmdroot.Foundation.HANDLE, winmdroot.System.StationsAndDesktops.USER_OBJECT_INFORMATION_INDEX, void*, uint, uint*)"/> 2018 internal static unsafe winmdroot.Foundation.BOOL GetUserObjectInformation(winmdroot.Foundation.HANDLE hObj, winmdroot.System.StationsAndDesktops.USER_OBJECT_INFORMATION_INDEX nIndex, [Optional] Span<byte> pvInfo) 2044 internal static unsafe winmdroot.Foundation.BOOL GetUserObjectInformation(winmdroot.Foundation.HANDLE hObj, winmdroot.System.StationsAndDesktops.USER_OBJECT_INFORMATION_INDEX nIndex, [Optional] void* pvInfo, uint nLength, [Optional] uint* lpnLengthNeeded) 2052 static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.HANDLE hObj, winmdroot.System.StationsAndDesktops.USER_OBJECT_INFORMATION_INDEX nIndex, [Optional] void* pvInfo, uint nLength, [Optional] uint* lpnLengthNeeded); 2556 /// <inheritdoc cref="MsgWaitForMultipleObjectsEx(uint, winmdroot.Foundation.HANDLE*, uint, winmdroot.UI.WindowsAndMessaging.QUEUE_STATUS_FLAGS, winmdroot.UI.WindowsAndMessaging.MSG_WAIT_FOR_MULTIPLE_OBJECTS_EX_FLAGS)"/> 2558 internal static unsafe winmdroot.Foundation.WAIT_EVENT MsgWaitForMultipleObjectsEx([Optional] ReadOnlySpan<winmdroot.Foundation.HANDLE> pHandles, uint dwMilliseconds, winmdroot.UI.WindowsAndMessaging.QUEUE_STATUS_FLAGS dwWakeMask, winmdroot.UI.WindowsAndMessaging.MSG_WAIT_FOR_MULTIPLE_OBJECTS_EX_FLAGS dwFlags) 2560 fixed (winmdroot.Foundation.HANDLE* pHandlesLocal = pHandles) 2590 internal static unsafe winmdroot.Foundation.WAIT_EVENT MsgWaitForMultipleObjectsEx(uint nCount, [Optional] winmdroot.Foundation.HANDLE* pHandles, uint dwMilliseconds, winmdroot.UI.WindowsAndMessaging.QUEUE_STATUS_FLAGS dwWakeMask, winmdroot.UI.WindowsAndMessaging.MSG_WAIT_FOR_MULTIPLE_OBJECTS_EX_FLAGS dwFlags) 2598 static extern unsafe winmdroot.Foundation.WAIT_EVENT LocalExternFunction(uint nCount, [Optional] winmdroot.Foundation.HANDLE* pHandles, uint dwMilliseconds, winmdroot.UI.WindowsAndMessaging.QUEUE_STATUS_FLAGS dwWakeMask, winmdroot.UI.WindowsAndMessaging.MSG_WAIT_FOR_MULTIPLE_OBJECTS_EX_FLAGS dwFlags);
_generated\464\Windows.Win32.STARTUPINFOW.g.cs (3)
102 internal winmdroot.Foundation.HANDLE hStdInput; 108 internal winmdroot.Foundation.HANDLE hStdOutput; 111 internal winmdroot.Foundation.HANDLE hStdError;
_generated\88\Windows.Win32.HELPINFO.g.cs (1)
48 internal winmdroot.Foundation.HANDLE hItemHandle;
System\Windows\Forms\FileDialogCustomPlace.cs (1)
70int result = PInvoke.SHGetKnownFolderPath(reference, 0, HANDLE.Null, (PWSTR*)path);
System\Windows\Forms\Internals\ScaleHelper.cs (2)
82HANDLE.Null, 402PInvoke.GetProcessDpiAwareness(HANDLE.Null, out PROCESS_DPI_AWARENESS processDpiAwareness);
System\Windows\Forms\Internals\ThemingScope.cs (2)
14private static HANDLE s_hActCtx; 24HANDLE current;
Windows\Win32\PInvoke.CloseHandle.cs (2)
8/// <inheritdoc cref="CloseHandle(HANDLE)"/> 9public static BOOL CloseHandle<T>(T handle) where T : IHandle<HANDLE>