Platform SDK: RAS/Routing and RAS |
The RASDIALPARAMS structure contains parameters that are used by RasDial to establish a remote access connection.
typedef struct _RASDIALPARAMS { DWORD dwSize; TCHAR szEntryName[RAS_MaxEntryName + 1]; TCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1]; TCHAR szCallbackNumber[RAS_MaxCallbackNumber + 1]; TCHAR szUserName[UNLEN + 1]; TCHAR szPassword[PWLEN + 1]; TCHAR szDomain[DNLEN + 1] ; #if (WINVER >= 0x401) DWORD dwSubEntry; ULONG_PTR dwCallbackId; #endif } RASDIALPARAMS;
Windows NT 4.0 and later versions: The callback number is no longer stored in the registry. Specifying an asterisk for szCallbackNumber causes RAS to return error 704: ERROR_BAD_CALLBACK_NUMBER.
Windows NT/2000: You can use szPassword to send a new password to the remote server when you restart a RasDial connection from a RASCS_PasswordExpired paused state. When changing a password on an entry that calls Microsoft Networks, you should limit the new password to 14 characters in length to avoid down-level compatibility problems.
Windows 2000 and later versions: When retrieving the password using the RasGetEntryDialParams function, the szPassword member does not receive the actual password. Instead, szPassword receives a handle to the saved password. You can substitute this handle for the saved password in calls to RasSetDialParams, and RasDial. When presented with this handle, RasDial retrieves and uses the saved password. The value of this handle may change in future versions of the operating system; do not develop code that depends on the contents or format of this value.
If the dial mode of the phone-book entry is RASEDM_DialAll, dwSubEntry is ignored. If the phone-book entry has no subentries, dwSubEntry is ignored.
The subentry indices are one-based. That is, the first subentry has an index of one, the second subentry as an index of two, and so on.
The RASENTRY structure returned by RasGetEntryProperties indicates the dial mode (dwDialMode) and number of subentries (dwSubEntries) for the phone-book entry.
Windows 2000 and later: If dwSubEntry specifies a valid subentry index, RAS dials the specified subentry regardless of the dial mode. If the dial mode is RASEDM_DialAll and dwSubEntry is zero, RAS dials all of the subentries.
The szUserName and szPassword strings are used to authenticate the user's access to the remote access server.
Windows NT/2000: RAS does not actually log the user onto the network. The user does this in the usual manner, for example, by logging on with cached credentials prior to making the connection, or by using CTRL+ALT+DEL after the RAS connection is established.
If both the szUserName and szPassword members are empty strings (""), RAS uses the user name and password of the current logon context for authentication. For a user-mode application, RAS uses the credentials of the currently logged-on interactive user. For a Win32 service process, RAS uses the credentials associated with the service.
Windows 95: RAS uses the szUserName and szPassword strings to log the user onto the network.
Windows 95 cannot obtain the password of the currently logged-on user, so if both the szUserName and the szPassword members are empty strings (""), RAS leaves the user name and password empty during authentication.
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Ras.h.
Unicode: Declared as Unicode and ANSI structures.
Remote Access Service (RAS) Overview, Remote Access Service Structures, RasDial, RasGetEntryProperties, RasSetEntryDialParams, RASENTRY