Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

SafeHandle Members

Represents a wrapper class for operating system handles. This class must be inherited.

The following tables list the members exposed by the SafeHandle type.

  Name Description
Protected method SafeHandle Initializes a new instance of the SafeHandle class with the specified invalid handle value.
Top
  Name Description
Protected field handle Specifies the handle to be wrapped.
Top
  Name Description
Public property IsClosed Gets a value indicating whether the handle is closed.
Public property IsInvalid When overridden in a derived class, gets a value indicating whether the handle value is invalid.
Top
(see also Protected Methods )
  Name Description
Public method Close Marks the handle for releasing and freeing resources.
Public method DangerousAddRef Manually increments the reference counter on SafeHandle instances.
Public method DangerousGetHandle Returns the value of the handle field.
Public method DangerousRelease Manually decrements the reference counter on a SafeHandle instance.
Public method Dispose Overloaded. Releases the resources used by the SafeHandle class.
Public method Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetType  Gets the Type of the current instance. (inherited from Object)
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method SetHandleAsInvalid Marks a handle as no longer used.
Public method ToString  Returns a String that represents the current Object. (inherited from Object)
Top
  Name Description
Protected method Dispose Overloaded. Releases the resources used by the SafeHandle class.
Protected method Finalize Overridden. Frees all resources associated with the handle.
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (inherited from Object)
Protected method ReleaseHandle When overridden in a derived class, executes the code required to free the handle.
Protected method SetHandle Sets the handle to the specified pre-existing handle.
Top
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.