Constructors: NewSafeHandle

NewSafeHandle

Initializes a new instance of the SafeHandle class.



 Public Function NewSafeHandle(
	  ByVal PreexistingHandle As Long,
	  ByVal OwnsHandle As Boolean,
	  Optional ByVal ZeroIsInvalid = False ) As SafeHandle

Parameters

PreexistingHandle
[ByVal] Long. An Long pointer that represents the pre-existing handle to use.
OwnsHandle
[ByVal] Boolean. True to reliably release the handle during the finalization phase; False to prevent reliable release (not recommended).
ZeroIsInvalid
[ByVal] Optional. Variant. True if a handle of the value zero is considered an invalid handle; False otherwise.  

Default: False

Return Values

SafeHandle -  A new instance of the SafeHandle class.

Remarks

The SafeHandle class is used as base class through composition for managing specific handles.

See Also

Project CorLib Overview

Class Constructors Overview