The Disconnect method is used in conjunction with the Connect method, to halt communication between the Host Automation Object and the currently connected BlueZone session. Disconnect should be called when a subroutine or module is done with the host session.
To reestablish communication with the same BlueZone Session or a new BlueZone session, use the Connect method. See the Connect method for more information.
Parameters:
None
Returns:
0 for success; or a non-zero error code. See Error Codes for a complete listing of error code descriptions.
Remarks:
The Disconnect method should be used in conjunction with the Connect method as shown in the following example.
Example:
Set Host = CreateObject( "BZWhll.WhllObj" )
UserId = "John"
Password = "Smith"
ResultCode = Host.Connect( "A" )
If ( ResultCode = 0 ) Then
Host.WriteScreen Userid, 5, 63
Host.WriteScreen Password, 6, 63
Host.SendKey "@E"
Host.WaitReady 10, 1
Host.Disconnect
End If