Partager via


RASCONNSTATE (Windows Embedded CE 6.0)

1/6/2010

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.

Syntax

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.

Value Description

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.

Note that Windows Embedded 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 client's 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.EXE.

RASCS_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

Header ras.h
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

RAS Enumerations
RasDial
RasGetConnectStatus
RasGetProjectionInfo
RASCONNSTATUS