Applies to: RASEntry
Obtained from RASEntry.Status property. When queried from the property the RASEntry object synchronizes the state information for the RAS entry it represents and the returned RASConState object is guaranteed to reflect the current state of the entry. This means it is best to obtain fresh RASConState object from the RASEntry.Status property each time you want to query its state. Using the Refresh method will refresh the state information but only until the current connection is active (if the entry is connected). If the entry has been disconnected and reconnected again the Refresh method will no longer do any useful work - you will need to obtain new RASConState object from the RASEntry of interest. Thus the Refresh method is an useful  helper only for phases in which you need to follow a dialing process you have just invoked.

You can use the DeviceType/DeviceName as alternative (to RASEntry.IsActive) indicators that a connection is actually in progress. They have non-empty values only if the entry is connected/connecting.

Members reference

Name Syntax Description
State variable = object.State Returns the state of the connection (if connected). Common constants returned:
RASCS_OpenPort = 0
RASCS_PortOpened = 1
RASCS_ConnectDevice = 2
RASCS_DeviceConnected = 3
RASCS_AllDevicesConnected = 4
RASCS_Authenticate = 5
RASCS_AuthNotify = 6
RASCS_AuthRetry = 7
RASCS_AuthCallback = 8
RASCS_AuthChangePassword = 9
RASCS_AuthProject = 10
RASCS_AuthLinkSpeed = 11
RASCS_AuthAck = 12
RASCS_ReAuthenticate = 13
RASCS_Authenticated = 14
RASCS_PrepareForCallback =15
RASCS_WaitForModemReset = 16
RASCS_WaitForCallback = 17
RASCS_Projected = 18
Note that some OS versions support more values. Consult MSDN for extended information about the possible values for the OS version you work with.
ErrorNumber variable = object.ErrorNumber Returns the error number > 0 (if error has occurred). If you are interested in displaying particular error messages you can obtain the RAS error list from raserror.h file from MS Visual C include directory. There are over 150 different error messages listed in it.
DeviceType variable = object.DeviceType Returns a string representing the device type used for the connection (if connected/connecting - empty otherwise).
DeviceName variable = object.DeviceName Returns a string representing the device name used for the connection (if connected/connecting - empty otherwise).
Refresh object.Refresh() Refreshes the status information (see the notes above).