Partager via


RasGetEntryDialParams (Windows Embedded CE 6.0)

1/6/2010

This function retrieves the connection information saved by the last successful call to the RasDial function for a specified phone book entry.

Syntax

DWORD RasGetEntryDialParams(
  LPWSTR lpszPhoneBook, 
  LPRASDIALPARAMS lpRasDialParams, 
  LPBOOL lpfPassword 
);

Parameters

  • lpszPhoneBook
    This parameter is ignored and should be set to NULL. Dial-up networking stores phone-book entries in the registry rather than in a phone-book file.
  • lpRasDialParams
    Pointer to a RASDIALPARAMS structure. On input, the dwSize member must specify the size of the RASDIALPARAMS structure, and the szEntryName member must specify a valid phone-book entry. On output, the structure receives the connection parameters associated with the specified phone-book entry.

    Note that the szPhoneNumber member of the structure does not receive the phone number associated with the phone-book entry. To get the phone number associated with a phone-book entry, call the RasGetEntryProperties function.

  • lpfPassword
    Pointer to a flag that indicates whether the function retrieved the password associated with the user name for the phone-book entry. The function sets this flag to TRUE if the user's password was returned in the szPassword member of the RASDIALPARAMS structure pointed to by lpRasDialParams.

Return Value

Zero indicates success. ERROR_BUFFER_INVALID indicates that the lpRasDialParams or lpfPassword pointer is invalid, or the lpRasDialParams buffer is invalid. ERROR_CANNOT_OPEN_PHONEBOOK indicates that the phone book is corrupted or missing components. ERROR_CANNOT_FIND_PHONEBOOK_ENTRY indicates that the phone-book entry does not exist.

Include Raserror.h for definitions of the RAS error codes.

Remarks

The szCallBackNumber and szPhoneNumber members of lpRasDialParams are not used and should be set to NULL.

When the dwSize member of the RASDIALPARAMS structure, which is pointed to by the lpRasDialParams parameter, is uninitialized or set to an incorrect value, the RasGetEntryDialParams function fails and returns a misleading error value, ERROR_CANNOT_FIND_PHONEBOOK_ENTRY.

Note

This function requires that a plain text password is provided, but it does not return a plain text password. Therefore only trusted applications should be allowed to make calls to RasGetEntryDialParams.

Note

To provide a networking environment with enhanced security, Windows Embedded CE-based devices should include the functionality for a power-on password. Users are strongly encouraged to use the power-on password feature to prevent unauthorized users from searching for stored passwords on the device.

Requirements

Header ras.h
Library coredll.lib
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

RAS Functions
RasDial
RasSetEntryDialParams
RASDIALPARAMS