C# Class 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).
Inheritance: System.Runtime.InteropServices.SafeHandle
Afficher le fichier Open project: GoldRenard/DMOAdvancedLauncher Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
HWND ( ) : System
IsWindow ( IntPtr hwnd ) : bool

Method Details

Equals() public méthode

public Equals ( HWND other ) : bool
other HWND
Résultat bool

Equals() public méthode

public Equals ( object obj ) : bool
obj object
Résultat bool

GetHashCode() public méthode

public GetHashCode ( ) : int
Résultat int

HWND() public méthode

Public constructor to create an HWND SafeHandle instance for an existing handle.
public HWND ( IntPtr hwnd ) : System
hwnd System.IntPtr
Résultat System

HWND() protected méthode

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
Résultat System

HWND() protected méthode

Constructor for derived classes to control whether or not the handle is owned.
protected HWND ( bool ownsHandle ) : System
ownsHandle bool
Résultat System

ReleaseHandle() protected méthode

protected ReleaseHandle ( ) : bool
Résultat bool

operator() public static méthode

public static operator ( ) : bool
Résultat bool