Uninitialize Method  
 

Uninitialize the component and unload the Remote Access Services library.

Syntax

object.Uninitialize

Parameters

None.

Return Type

None.

Remarks

The Uninitialize method terminates any active dial-up networking connection established by the control and unloads the Remote Access Services (RAS) library. This method is not typically used because any resources that have been allocated by an instance of the control will automatically be released when it is destroyed. To prevent the connection from being terminated when the control is uninitialized, set the AutoDisconnect property to False or set the Handle property to a value of zero before calling this method.

Each time the Initialize method is invoked, it increments an internal counter that keeps track of the number of times that it has been called by any thread in the current process. The Uninitialize method decrements this counter, and when the usage count drops to zero, the control will automatically unload the system libraries that it has dynamically loaded and will destroy the process heap that was allocated when the first instance of the control was created. An application should only call the Uninitialize method if it has explicitly called the Initialize method.

See Also

AutoDisconnect Property, Handle Property, Connect Method, Disconnect Method, Initialize Method