Dial Method

The Dial method establishes a RAS connection between your application, the RAS client, and a RAS server. The values of the EntryName, PhoneNumber, CallbackNumber, UserName, Password, and Domain properties are used to make the connection.

Syntax

object.Dial

The Dial method syntax has these parts:

Part
Description
object An object expression that evaluates to the EasyDial control.

Return Values

If the method succeeds, it will return zero.

If the function fails, it will return a non-zero error code. By calling the GetErrorString method, you can get a human readable description of the error.

Remarks

Errors that occur after the immediate return can be detected by reading the Error property.

The dialing process happens asynchronously. The Dial() method initiates the dialing process. If successful, the  OnConnecting event will be fired to indicate the progress. You can also check the current status of the dialing progress by reading the State and Error properties. If the dialing succeeds, the OnConnected() event will eventually be fired, and the IsConnected property will become true. If the dialing process fails, the OnConnecting() event will be fired with an error value.  You can call HangUp() to terminate the connection at any time, even when the dialing is still in progress.

This method should not be called within the OnConnecting and OnConnected event handlers.

 
Copyright © 2000-2001 Zhenyang Zhu
All rights reserved.