C# Класс AdvancedLauncher.Tools.Win32.User32.HWND

A SafeHandle representing an HWND.
HWNDs have very loose ownership semantics. Unlike normal handles, there is no "CloseHandle" API for HWNDs. There are APIs like CloseWindow or DestroyWindow, but these actually affect the window, not just your handle to the window. This SafeHandle type does not actually do anything to release the handle in the finalizer, it simply provides type safety to the PInvoke signatures. The StrongHWND SafeHandle will actually destroy the HWND when it is disposed or finalized. Because of this loose ownership semantic, the same HWND value can be returned from multiple APIs and can be directly compared. Since SafeHandles are actually reference types, we have to override all of the comparison methods and operators. We also support equality between null and HWND(IntPtr.Zero).
Наследование: System.Runtime.InteropServices.SafeHandle
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Equals ( HWND other ) : bool
Equals ( object obj ) : bool
GetHashCode ( ) : int
HWND ( IntPtr hwnd ) : System

Public constructor to create an HWND SafeHandle instance for an existing handle.

operator ( ) : bool

Защищенные методы

Метод Описание
HWND ( IntPtr hwnd, bool ownsHandle ) : System

Constructor for derived classes to specify a handle and to control whether or not the handle is owned.

HWND ( bool ownsHandle ) : System

Constructor for derived classes to control whether or not the handle is owned.

ReleaseHandle ( ) : bool

Приватные методы

Метод Описание
HWND ( ) : System
IsWindow ( IntPtr hwnd ) : bool

Описание методов

Equals() публичный Метод

public Equals ( HWND other ) : bool
other HWND
Результат bool

Equals() публичный Метод

public Equals ( object obj ) : bool
obj object
Результат bool

GetHashCode() публичный Метод

public GetHashCode ( ) : int
Результат int

HWND() публичный Метод

Public constructor to create an HWND SafeHandle instance for an existing handle.
public HWND ( IntPtr hwnd ) : System
hwnd System.IntPtr
Результат System

HWND() защищенный Метод

Constructor for derived classes to specify a handle and to control whether or not the handle is owned.
protected HWND ( IntPtr hwnd, bool ownsHandle ) : System
hwnd System.IntPtr
ownsHandle bool
Результат System

HWND() защищенный Метод

Constructor for derived classes to control whether or not the handle is owned.
protected HWND ( bool ownsHandle ) : System
ownsHandle bool
Результат System

ReleaseHandle() защищенный Метод

protected ReleaseHandle ( ) : bool
Результат bool

operator() публичный статический Метод

public static operator ( ) : bool
Результат bool