RASCONNSTATE
This enumeration type contains values that specify the states that may occur during a RAS connection operation. If you use the RasDial function to establish a RAS connection, you can specify a window to receive notification messages that report the current connection state. You can also use the RasGetConnectStatus function to get the connection state for a specified connection.
typedef enum _RASCONNSTATE {
RASCS_OpenPort = 0,
RASCS_PortOpened,
RASCS_ConnectDevice,
RASCS_DeviceConnected,
RASCS_AllDevicesConnected,
RASCS_Authenticate,
RASCS_AuthNotify,
RASCS_AuthRetry,
RASCS_AuthCallback,
RASCS_AuthChangePassword,
RASCS_AuthProject,
RASCS_AuthLinkSpeed,
RASCS_AuthAck,
RASCS_ReAuthenticate,
RASCS_Authenticated,
RASCS_PrepareForCallback,
RASCS_WaitForModemReset,
RASCS_WaitForCallback,
RASCS_Projected,
RASCS_Interactive = RASCS_PAUSED,
RASCS_RetryAuthentication,
RASCS_CallbackSetByCaller,
RASCS_PasswordExpired,
RASCS_Connected = RASCS_DONE,
RASCS_Disconnected
} RASCONNSTATE ;
Enumerator Values
The enumerator values are listed here in the general order in which the connection states occur. However, you should not write code that depends on the order or occurrence of particular RASCONNSTATE connection states, because this may vary between platforms.
RASCS_OpenPort
The communication port is about to be opened.RASCS_PortOpened
The communication port has been opened successfully.RASCS_ConnectDevice
A device is about to be connected. RasGetConnectStatus can be called to determine the name and type of the device being connected.RASCS**_**DeviceConnected
A device has connected successfully. RasGetConnectStatus can be called to determine the name and type of the device being connected.For a simple modem connection, RASCS**_ConnectDevice and RASCS_**DeviceConnected will be called only once. For a dial-up X.25 PAD connection, the pair will be called first for the modem, then for the PAD. If a preconnect switch is configured, the pair will be called for the switch before any other devices connect. Likewise, the pair will be called for a postconnect switch after any other devices connect.
Windows CE: Note that Windows CE does not currently support multistage connections such as the X.25 PAD connection described earlier.
RASCS**_**AllDevicesConnected
All devices in the device chain have successfully connected. At this point, the physical link is established.RASCS**_**Authenticate
The authentication process is starting. Remote access does not enable the remote client to generate any traffic on the LAN until authentication has been successfully completed.Remote access authentication on a Windows NT or Windows 95 server consists of:
- Validating the user name/ password on the specified domain.
- Projecting the client onto the LAN. This means that the remote access server does what is necessary to send and receive data on the LAN on behalf of the client. For example, the remote access server might need to add a NetBIOS name that corresponds to the clients computer name.
- Call-back processing in which the client hangs up and the server calls back. (The user needs special permissions on the remote access server for this.)
- Calculating the link speed. This is necessary to correctly set transport time-outs to match the relatively slow speed of the remote link.
RASCS**_**AuthNotify
An authentication event has occurred. If dwError is zero, this event will be immediately followed by one of the more specific authentication states following. If dwError is nonzero, authentication has failed, and the error value indicates why.RASCS**_**AuthRetry
The client has requested another validation attempt with a new user name/password/domain.RASCS**_**AuthCallback
The remote access server has requested a callback number. This occurs only if the user has Set By Caller callback privilege on the server.RASCS**_**AuthChangePassword
The client has requested to change the password on the account.RASCS**_**AuthProject
The projection phase is starting.RASCS**_**AuthLinkSpeed
The link-speed calculation phase is starting.RASCS**_**AuthAck
An authentication request is being acknowledged.RASCS**_**ReAuthenticate
Reauthentication (after callback) is starting.RASCS**_**Authenticated
The client has successfully completed authentication.RASCS**_**PrepareForCallback
The line is about to disconnect in preparation for callback.RASCS**_**WaitForModemReset
The client is delaying in order to give the modem time to reset itself in preparation for callback.RASCS**_**WaitForCallback
The client is waiting for an incoming call from the remote access server.RASCS**_**Projected
This state occurs after the RASCS_AuthProject state. It indicates that projection result data is available. You can access the projection result data by calling RasGetProjectionInfo.RASCS**_**Interactive
This state corresponds to the terminal state supported by RASPHONE.EXE.RASCS**_**RetryAuthentication
This state corresponds to the retry authentication state supported by RASPHONE.EXERASCS**_**CallbackSetByCaller
This state corresponds to the callback state supported by RASPHONE.EXE.RASCS**_**PasswordExpired
This state corresponds to the change password state supported by RASPHONE.EXE.RASCS**_**Connected
Successful connection.RASCS**_**Disconnected
Disconnection or failed connection.
Remarks
The connection process states are divided into three classes: running states, paused states, and terminal states.
An application can easily determine the class of a specific state by performing Boolean bit operations with the RASCS_PAUSED and RASCS_DONE bitmasks. Here are some examples:
fDoneState = (state & RASCS_DONE);
fPausedState = (state & RASCS_PAUSED);
fRunState = !(fDoneState || fPausedState);
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 1.0 and later | Ras.h |
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
See Also
RasDial, RasGetConnectStatus, RasGetProjectionInfo, RASCONNSTATUS
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.