OnConnecting Event

The OnConnecting will be fired to notify the state change of the remote access connection process.

Syntax

OnConnecting (ByVal connectionState as Long, ByVal Error as Long, ByVal ExtendedError as Long) 

The OnConnecting event syntax has these parts:

Part
Description
connectionState Specifies the state the remote access process is to enter
Error Specifies the error that has occurred. If no error has occurred, Error is zero.
ExtendedError Specifies extended error information for certain nonzero values of Error. Please refer to Win32 SDK for further information.

Remarks

If  Error is nonzero, the connection process is suspended when the OnConnecting event handler is executing. Therefore, you should make the event handler return as quickly as possible. However, for modems, a slow return from the OnConnecting event handler generally is not a problem.

This event only occurs during the remote access connection process. After the connection process completes, state changes of the connection won't trigger this event.

The Dial method should not be called within the OnConnecting event handler.

The order or occurrence of particular connection states may vary across platforms.

 
Copyright © 2000-2001 Zhenyang Zhu
All rights reserved.