7 instantiations of HANDLE
System.Drawing.Common.Tests (1)
System\Drawing\GdiPlusHandlesTests.cs (1)
31
HANDLE processHandle =
new
(currentProcess.Handle);
System.Private.Windows.Core (6)
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.HWND.g.cs (1)
61
public static implicit operator HANDLE(HWND value) => new
HANDLE
(value.Value);
Windows\Win32\UI\WindowsAndMessaging\HCURSOR.cs (1)
12
public static implicit operator HANDLE(HCURSOR handle) =>
new
((nint)handle);
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (1)
12
public static implicit operator HANDLE(HICON handle) =>
new
((nint)handle);
128 references to HANDLE
System.Drawing.Common (4)
System\Drawing\BufferedGraphicsContext.cs (1)
409
hbitmap = PInvokeCore.CreateDIBSection(hdc, bitmapInfo, DIB_USAGE.DIB_RGB_COLORS, &pvBits,
HANDLE
.Null, 0);
System\Drawing\Graphics.cs (1)
102
Gdip.CheckStatus(PInvokeGdiPlus.GdipCreateFromHDC2((HDC)hdc, (
HANDLE
)hdevice, &nativeGraphics));
System\Drawing\Printing\PageSettings.cs (1)
327
HANDLE
.Null,
Windows.Win32.PInvoke.winspool.drv.g.cs (1)
67
internal static extern unsafe int DocumentProperties(winmdroot.Foundation.HWND hWnd, winmdroot.Foundation.
HANDLE
hPrinter, winmdroot.Foundation.PWSTR pDeviceName, [Optional] winmdroot.Graphics.Gdi.DEVMODEW* pDevModeOutput, [Optional] winmdroot.Graphics.Gdi.DEVMODEW* pDevModeInput, uint fMode);
System.Drawing.Common.Tests (1)
System\Drawing\GdiPlusHandlesTests.cs (1)
31
HANDLE
processHandle = new(currentProcess.Handle);
System.Private.Windows.Core (36)
System\Private\Windows\Ole\DragDropFormat.cs (1)
70
(
HANDLE
)(nint)mediumSource.hGlobal,
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());
Windows.Win32.HWND.g.cs (1)
61
public static implicit operator
HANDLE
(HWND value) => new HANDLE(value.Value);
Windows.Win32.PInvokeCore.GDI32.dll.g.cs (4)
202
/// <inheritdoc cref="CreateDIBSection(winmdroot.Graphics.Gdi.HDC, winmdroot.Graphics.Gdi.BITMAPINFO*, winmdroot.Graphics.Gdi.DIB_USAGE, void**, winmdroot.Foundation.
HANDLE
, uint)"/>
204
internal static unsafe winmdroot.Graphics.Gdi.HBITMAP CreateDIBSection(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.BITMAPINFO* pbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage, out void* ppvBits, winmdroot.Foundation.
HANDLE
hSection, uint offset)
236
internal static unsafe winmdroot.Graphics.Gdi.HBITMAP CreateDIBSection(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.BITMAPINFO* pbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage, void** ppvBits, winmdroot.Foundation.
HANDLE
hSection, uint offset)
244
static extern unsafe winmdroot.Graphics.Gdi.HBITMAP LocalExternFunction(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Graphics.Gdi.BITMAPINFO* pbmi, winmdroot.Graphics.Gdi.DIB_USAGE usage, void** ppvBits, winmdroot.Foundation.
HANDLE
hSection, uint offset);
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);
Windows.Win32.PInvokeCore.OLE32.dll.g.cs (2)
111
internal static extern winmdroot.Foundation.
HANDLE
OleDuplicateData(winmdroot.Foundation.
HANDLE
hSrc, winmdroot.System.Ole.CLIPBOARD_FORMAT cfFormat, winmdroot.System.Memory.GLOBAL_ALLOC_FLAGS uiFlags);
Windows.Win32.PInvokeCore.USER32.dll.g.cs (7)
109
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)
112
winmdroot.Foundation.
HANDLE
__retVal = LocalExternFunction(h, type, cx, cy, flags);
117
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);
489
internal static uint GetGuiResources(winmdroot.Foundation.
HANDLE
hProcess, winmdroot.System.Threading.GET_GUI_RESOURCES_FLAGS uiFlags)
497
static extern uint LocalExternFunction(winmdroot.Foundation.
HANDLE
hProcess, winmdroot.System.Threading.GET_GUI_RESOURCES_FLAGS uiFlags);
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)
11
public static explicit operator HCURSOR(
HANDLE
handle) => new((nint)handle);
12
public static implicit operator
HANDLE
(HCURSOR handle) => new((nint)handle);
Windows\Win32\UI\WindowsAndMessaging\HICON.cs (2)
11
public static explicit operator HICON(
HANDLE
handle) => new((nint)handle);
12
public static implicit operator
HANDLE
(HICON handle) => new((nint)handle);
System.Private.Windows.GdiPlus (4)
System\Drawing\IIconExtensions.cs (1)
22
(
HANDLE
)icon.Handle,
Windows.Win32.PInvokeGdiPlus.gdiplus.dll.g.cs (3)
1105
/// <inheritdoc cref="GdipCreateFromHDC2(winmdroot.Graphics.Gdi.HDC, winmdroot.Foundation.
HANDLE
, winmdroot.Graphics.GdiPlus.GpGraphics**)"/>
1106
internal static unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFromHDC2(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.
HANDLE
hDevice, ref winmdroot.Graphics.GdiPlus.GpGraphics* graphics)
1116
internal static extern unsafe winmdroot.Graphics.GdiPlus.Status GdipCreateFromHDC2(winmdroot.Graphics.Gdi.HDC hdc, winmdroot.Foundation.
HANDLE
hDevice, winmdroot.Graphics.GdiPlus.GpGraphics** graphics);
System.Windows.Forms (18)
System\Windows\Forms\Application.ThreadContext.cs (8)
19
internal abstract unsafe partial class ThreadContext : MarshalByRefObject, IHandle<
HANDLE
>
46
private
HANDLE
_handle;
73
HANDLE
target;
302
_handle =
HANDLE
.Null;
459
_handle =
HANDLE
.Null;
519
public
HANDLE
Handle => _handle;
521
HANDLE
IHandle<
HANDLE
>.Handle => Handle;
System\Windows\Forms\Control.cs (1)
3569
HANDLE
threadHandle = ctx.Handle;
System\Windows\Forms\Input\Cursor.cs (5)
20
public sealed class Cursor : IDisposable, ISerializable, IHandle<HICON>, IHandle<
HANDLE
>, IHandle<HCURSOR>
216
HANDLE
IHandle<
HANDLE
>.Handle => (
HANDLE
)Handle;
422
(
HANDLE
)cursorHandle.Value,
System\Windows\Forms\NativeWindow.cs (1)
114
PInvoke.GetExitCodeThread((
HANDLE
)threadHandle, &exitCode);
System\Windows\Forms\Printing\PrinterSettingsExtensions.cs (2)
26
modeSize = PInvoke.DocumentProperties(HWND.Null,
HANDLE
.Null, n, null, (DEVMODEW*)null, 0);
40
HANDLE
.Null,
System\Windows\Forms\SystemInformation.cs (1)
501
(
HANDLE
)hwinsta.Value,
System.Windows.Forms.Interop.Tests (1)
PropertyGridTests.cs (1)
82
HANDLE
handle;
System.Windows.Forms.Primitives (59)
System\Windows\Forms\FileDialogCustomPlace.cs (1)
70
int result = PInvoke.SHGetKnownFolderPath(reference, 0,
HANDLE
.Null, (PWSTR*)path);
System\Windows\Forms\Internals\ScaleHelper.cs (2)
82
HANDLE
.Null,
402
PInvoke.GetProcessDpiAwareness(
HANDLE
.Null, out PROCESS_DPI_AWARENESS processDpiAwareness);
System\Windows\Forms\Internals\ThemingScope.cs (2)
14
private static
HANDLE
s_hActCtx;
24
HANDLE
current;
Windows.Win32.CLIENTCREATESTRUCT.g.cs (1)
34
internal winmdroot.Foundation.
HANDLE
hWindowMenu;
Windows.Win32.HELPINFO.g.cs (1)
48
internal winmdroot.Foundation.
HANDLE
hItemHandle;
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*)"/>
28
internal static unsafe winmdroot.Foundation.HRESULT GetProcessDpiAwareness(winmdroot.Foundation.
HANDLE
hprocess, out winmdroot.UI.HiDpi.PROCESS_DPI_AWARENESS value)
50
internal static extern unsafe winmdroot.Foundation.HRESULT GetProcessDpiAwareness(winmdroot.Foundation.
HANDLE
hprocess, winmdroot.UI.HiDpi.PROCESS_DPI_AWARENESS* value);
Windows.Win32.PInvoke.KERNEL32.dll.g.cs (30)
27
/// <inheritdoc cref="ActivateActCtx(winmdroot.Foundation.
HANDLE
, nuint*)"/>
29
internal static unsafe winmdroot.Foundation.BOOL ActivateActCtx(winmdroot.Foundation.
HANDLE
hActCtx, out nuint lpCookie)
52
internal static unsafe winmdroot.Foundation.BOOL ActivateActCtx(winmdroot.Foundation.
HANDLE
hActCtx, nuint* lpCookie)
60
static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.
HANDLE
hActCtx, nuint* lpCookie);
74
internal static winmdroot.Foundation.BOOL CloseHandle(winmdroot.Foundation.
HANDLE
hObject)
82
static extern winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.
HANDLE
hObject);
87
internal static unsafe winmdroot.Foundation.
HANDLE
CreateActCtx(in winmdroot.System.ApplicationInstallationAndServicing.ACTCTXW pActCtx)
91
winmdroot.Foundation.
HANDLE
__result = PInvoke.CreateActCtx(pActCtxLocal);
110
internal static unsafe winmdroot.Foundation.
HANDLE
CreateActCtx(winmdroot.System.ApplicationInstallationAndServicing.ACTCTXW* pActCtx)
113
winmdroot.Foundation.
HANDLE
__retVal = LocalExternFunction(pActCtx);
118
static extern unsafe winmdroot.Foundation.
HANDLE
LocalExternFunction(winmdroot.System.ApplicationInstallationAndServicing.ACTCTXW* pActCtx);
181
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)
189
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);
253
internal static unsafe winmdroot.Foundation.BOOL GetCurrentActCtx(winmdroot.Foundation.
HANDLE
* lphActCtx)
261
static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.
HANDLE
* lphActCtx);
272
internal static extern winmdroot.Foundation.
HANDLE
GetCurrentProcess();
289
internal static extern winmdroot.Foundation.
HANDLE
GetCurrentThread();
291
/// <inheritdoc cref="GetExitCodeThread(winmdroot.Foundation.
HANDLE
, uint*)"/>
293
internal static unsafe winmdroot.Foundation.BOOL GetExitCodeThread(winmdroot.Foundation.
HANDLE
hThread, out uint lpExitCode)
317
internal static unsafe winmdroot.Foundation.BOOL GetExitCodeThread(winmdroot.Foundation.
HANDLE
hThread, uint* lpExitCode)
325
static extern unsafe winmdroot.Foundation.BOOL LocalExternFunction(winmdroot.Foundation.
HANDLE
hThread, uint* lpExitCode);
585
/// <inheritdoc cref="LoadLibraryEx(winmdroot.Foundation.PCWSTR, winmdroot.Foundation.
HANDLE
, winmdroot.System.LibraryLoader.LOAD_LIBRARY_FLAGS)"/>
615
internal static winmdroot.Foundation.HMODULE LoadLibraryEx(winmdroot.Foundation.PCWSTR lpLibFileName, winmdroot.Foundation.
HANDLE
hFile, winmdroot.System.LibraryLoader.LOAD_LIBRARY_FLAGS dwFlags)
623
static extern winmdroot.Foundation.HMODULE LocalExternFunction(winmdroot.Foundation.PCWSTR lpLibFileName, winmdroot.Foundation.
HANDLE
hFile, winmdroot.System.LibraryLoader.LOAD_LIBRARY_FLAGS dwFlags);
Windows.Win32.PInvoke.SHELL32.dll.g.cs (4)
243
/// <inheritdoc cref="SHGetKnownFolderPath(global::System.Guid*, winmdroot.UI.Shell.KNOWN_FOLDER_FLAG, winmdroot.Foundation.
HANDLE
, winmdroot.Foundation.PWSTR*)"/>
245
internal static unsafe winmdroot.Foundation.HRESULT SHGetKnownFolderPath(in global::System.Guid rfid, winmdroot.UI.Shell.KNOWN_FOLDER_FLAG dwFlags, winmdroot.Foundation.
HANDLE
hToken, out winmdroot.Foundation.PWSTR ppszPath)
281
internal static unsafe winmdroot.Foundation.HRESULT SHGetKnownFolderPath(global::System.Guid* rfid, winmdroot.UI.Shell.KNOWN_FOLDER_FLAG dwFlags, winmdroot.Foundation.
HANDLE
hToken, winmdroot.Foundation.PWSTR* ppszPath)
287
static extern unsafe winmdroot.Foundation.HRESULT LocalExternFunction(global::System.Guid* rfid, uint dwFlags, winmdroot.Foundation.
HANDLE
hToken, winmdroot.Foundation.PWSTR* ppszPath);
Windows.Win32.PInvoke.USER32.dll.g.cs (7)
1934
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)
1942
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);
2425
/// <inheritdoc cref="MsgWaitForMultipleObjectsEx(uint, winmdroot.Foundation.
HANDLE
*, uint, winmdroot.UI.WindowsAndMessaging.QUEUE_STATUS_FLAGS, winmdroot.UI.WindowsAndMessaging.MSG_WAIT_FOR_MULTIPLE_OBJECTS_EX_FLAGS)"/>
2427
internal static unsafe winmdroot.Foundation.WAIT_EVENT MsgWaitForMultipleObjectsEx(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)
2429
fixed (winmdroot.Foundation.
HANDLE
* pHandlesLocal = pHandles)
2459
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)
2467
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);
Windows.Win32.PInvoke.winspool.drv.g.cs (3)
26
/// <inheritdoc cref="DocumentProperties(winmdroot.Foundation.HWND, winmdroot.Foundation.
HANDLE
, winmdroot.Foundation.PWSTR, winmdroot.Graphics.Gdi.DEVMODEW*, winmdroot.Graphics.Gdi.DEVMODEW*, uint)"/>
27
internal static unsafe int DocumentProperties(winmdroot.Foundation.HWND hWnd, winmdroot.Foundation.
HANDLE
hPrinter, winmdroot.Foundation.PWSTR pDeviceName, winmdroot.Graphics.Gdi.DEVMODEW* pDevModeOutput, winmdroot.Graphics.Gdi.DEVMODEW? pDevModeInput, uint fMode)
57
internal static extern unsafe int DocumentProperties(winmdroot.Foundation.HWND hWnd, winmdroot.Foundation.
HANDLE
hPrinter, winmdroot.Foundation.PWSTR pDeviceName, [Optional] winmdroot.Graphics.Gdi.DEVMODEW* pDevModeOutput, [Optional] winmdroot.Graphics.Gdi.DEVMODEW* pDevModeInput, uint fMode);
Windows.Win32.STARTUPINFOW.g.cs (3)
102
internal winmdroot.Foundation.
HANDLE
hStdInput;
108
internal winmdroot.Foundation.
HANDLE
hStdOutput;
111
internal winmdroot.Foundation.
HANDLE
hStdError;
Windows\Win32\PInvoke.CloseHandle.cs (2)
8
/// <inheritdoc cref="CloseHandle(
HANDLE
)"/>
9
public static BOOL CloseHandle<T>(T handle) where T : IHandle<
HANDLE
>
System.Windows.Forms.Primitives.TestUtilities (1)
PlatformDetection.Windows.cs (1)
167
PInvoke.CloseHandle((
HANDLE
)processToken);
System.Windows.Forms.Tests (3)
System\Windows\Forms\ClipboardTests.cs (2)
552
private static extern bool SetClipboardData(uint uFormat,
HANDLE
data);
561
SetClipboardData((uint)CLIPBOARD_FORMAT.CF_UNICODETEXT, (
HANDLE
)Marshal.StringToHGlobalUni(testString));
System\Windows\Forms\DragDropFormatTests.cs (1)
146
(
HANDLE
)(nint)dragDropFormat.Medium.hGlobal,
System.Windows.Forms.UI.IntegrationTests (1)
ImageListTests.cs (1)
74
(
HANDLE
)Process.GetCurrentProcess().Handle,