System.Runtime.InteropServices.SafeHandle Members

The members of System.Runtime.InteropServices.SafeHandle are listed below.

See Also: Inherited members from System.Runtime.ConstrainedExecution.CriticalFinalizerObject

Protected Constructors

Initializes a new instance of the System.Runtime.InteropServices.SafeHandle class with the specified invalid handle value.

Protected Fields

handleIntPtr.

Specifies the handle to be wrapped.

Public Properties

[read-only]
IsClosedbool.

Gets a value indicating whether the handle is closed.

[read-only]
abstract
IsInvalidbool.

When overridden in a derived class, gets a value indicating whether the handle value is invalid.

Public Methods

Close()

Marks the handle for releasing and freeing resources.

DangerousAddRef(ref bool)
Documentation for this section has not yet been entered.
DangerousGetHandle() : IntPtr

Returns the value of the SafeHandle.handle field.

DangerousRelease()

Manually decrements the reference counter on a System.Runtime.InteropServices.SafeHandle instance.

Dispose()

Releases all resources used by the System.Runtime.InteropServices.SafeHandle class.

Finalize()

Frees all resources associated with the handle.

SetHandleAsInvalid()

Marks a handle as no longer used.

Protected Methods

Dispose(bool)

Releases the unmanaged resources used by the System.Runtime.InteropServices.SafeHandle class specifying whether to perform a normal dispose operation.

abstract
ReleaseHandle() : bool

When overridden in a derived class, executes the code required to free the handle.

SetHandle(IntPtr)

Sets the handle to the specified pre-existing handle.