The tasks you can do with the EasyDial™ ActiveX Control can be grouped into four categories:
I. Making a Connection
You typically do the following procedures to dial and make a connection:
1. Fill in the parameters. You need to set the following properties to specify where and how to dial:
Normally it will be enough only to set the PhoneBook and the EntryName properties. The rest of the above properties are used to override the settings in the phone book entry. However, if you don't specify a phone book entry, you will have to specify the PhoneNumber, CallbackNumber, the UserName, Password, and Domain in your code.
Under Windows 95 and Windows 98, phone book entries are stored in the registry, so you typically sets the PhoneBook property to an empty string, which means to use the default phone book. Under Windows NT 4.0 and Windows 2000, phone book entries are stored in .PBK files. So if you don't want to use the default phone book, you should specify the full path and file name of the phone book file in the PhoneBook property.
2. Initiate the remote access connection process
After specifying the dial-up parameters, you will call the method Dial to initiate the dial up process, or what is called remote access connection process. The method Dial operates asynchronously. It will return before the remote access connection process completes.
If the Dial method is successful, you will then need to monitor the remote access process to see when the connection is established.
3. Monitor the remote access connection process
If the Dial method is successful, the remote access connection process begins. During the process, the OnConnecting event will be fired to indicate the state change of the connection process.
You will need to write an event handler for the OnConnecting event to monitor the pogress of the connection process.
The remote connection process ends up in one of the following three situations:
II. Monitoring the Status of the Current Connection
After the connection is established, you will need to manipulate the connection. The State property reflects the current state of the connection, and the Error property reflects the current error status of the connection. The DeviceName and DeviceType tell you the name and type of the device used to establish the connection.
III. Getting Information about Phone Book Entries, Current Connections, Devices, etc.
The Connections collection represents all the active RAS dial-out connections in the system.
The Devices collection gives you information of all the RAS capable devices.
The EntryNames property let you list all the phone book entries in any RAS phone book
IV. Checking the availability of remote access service
The EasyDial™ ActiveX control relies on the remote access services (RAS) to function. So your first thing to do before using any other functionality of EasyDial™ ActiveX control is to check if remote access service is available. You can do so by checking the IsAvailable property.
If the service is not available, you may want to prompt the user to install it. Installing Dial Up Network usually installs the remote access service.
|
All rights reserved. |