Microsoft.Win32.SafeHandles.CriticalHandleZeroOrMinusOneIsInvalid Class

Provides a base class for Win32 critical handle implementations in which the value of either 0 or -1 indicates an invalid handle.

See Also: CriticalHandleZeroOrMinusOneIsInvalid Members

Syntax

public abstract class CriticalHandleZeroOrMinusOneIsInvalid : System.Runtime.InteropServices.CriticalHandle

Remarks

This class derives from the System.Runtime.InteropServices.CriticalHandle class. It describes the format of an invalid handle. For example, some handles use -1 as an invalid handle value, while others use 0. Further derivations of this class (for example, file or registry handles) can specialize this further.

Use the Microsoft.Win32.SafeHandles.CriticalHandleZeroOrMinusOneIsInvalid class when you need to wrap an unmanaged resource that does not have an existing managed wrapper.

Note:

See the System.Runtime.InteropServices.CriticalHandle class for important information on critical handle security and thread safety.

Requirements

Namespace: Microsoft.Win32.SafeHandles
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0