Platform SDK: RAS/Routing and RAS

RASCREDENTIALS

The RASCREDENTIALS structure is used with the RasGetCredentials and RasSetCredentials functions to specify the user credentials associated with a RAS phone-book entry.

typedef struct {
  DWORD dwSize;
  DWORD dwMask;
  TCHAR szUserName[UNLEN + 1];
  TCHAR szPassword[PWLEN + 1];
  TCHAR szDomain[DNLEN + 1];
} RASCREDENTIALS, *LPRASCREDENTIALS;

Members

dwSize
Specifies the size, in bytes, of the RASCREDENTIALS structure.
dwMask
Specifies a set of bit flags that specify the members of this structure that are valid. On input, set the flags to indicate the members in which you are interested. On output, the function sets the flags to indicate the members that contain valid data. This member can be a combination of the following values.
Value Meaning
RASCM_UserName The szUserName member is valid.
RASCM_Password The szPassword member is valid.
RASCM_Domain The szDomain member is valid.

Windows 2000 and later versions: When retrieving credentials using the RasGetCredentials function, the dwMask member contains the RASCM_Password flag if the system has saved a password for the specified entry. If the system has no password saved for this entry, dwMask does not contain RASCM_Password.

szUserName
Specifies a null-terminated string that contains a user name.
szPassword
Specifies a null-terminated string that contains a password.

Windows 2000 and later versions: When retrieving credentials using the RasGetCredentials 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 RasSetCredentials and RasDial. When presented with this handle, RasDial will retrieve and use 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.

szDomain
A null-terminated string that contains a domain name.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 or later.
  Windows 95/98: Unsupported.
  Header: Declared in Ras.h.
  Unicode: Declared as Unicode and ANSI structures.

See Also

Remote Access Service (RAS) Overview, Remote Access Service Structures, RasGetCredentials, RasSetCredentials