Share via


RasSetEntryDialParams

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Syntax

DWORD RasSetEntryDialParams(
  LPWSTR lpszPhoneBook, 
  LPRASDIALPARAMS lpRasDialParams, 
  BOOL fRemovePassword 
);

Parameters

  • lpszPhoneBook
    This parameter is ignored and should be set to NULL. Dial-up networking stores phonebook entries in the registry rather than in a phonebook file.
  • lpRasDialParams
    Pointer to a RASDIALPARAMS structure that contains the connection parameters to be associated with the phonebook entry. RasSetEntryDialParams uses the structure's members as follows.

    Member Description

    dwSize

    Specifies the sizeof(RASDIALPARAMS) to identify the version of the structure.

    szEntryName

    Null-terminated string that identifies the phonebook entry to set parameters for.

    szPhoneNumber

    Not used; set to NULL.

    szCallbackNumber

    Not used; set to NULL.

    szUserName

    Null-terminated string that contains the logon name of the user associated with this entry. If szUserName is an empty string, the user name is ignored.

    szPassword

    Null-terminated string that contains the password for the user specified by szUserName. If szUserName is an empty string, the password is not changed. If szPassword is an empty string and fRemovePassword is FALSE, the password is set to the empty string. If fRemovePassword is TRUE, the password stored in this phonebook entry for the user specified by szUserName is removed regardless of the that contains of the szPassword string.

    szDomain

    Null-terminated string that contains the name of the domain to log on to. If szDomain is an empty string, the domain name is ignored.

  • fRemovePassword
    Boolean value that specifies whether to remove the phonebook entry's stored password for the user specified by lpRasDialParams->szUserName. If fRemovePassword is TRUE, the password is removed.

Return Value

Zero indicates success. ERROR_BUFFER_INVALID indicates that the address or buffer specified by lpRasDialParams is invalid. ERROR_CANNOT_OPEN_PHONEBOOK indicates that the phonebook is corrupted or missing components. ERROR_CANNOT_FIND_PHONEBOOK_ENTRY indicates that the phonebook 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.

Requirements

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

See Also

Reference

RasGetEntryDialParams
RASDIALPARAMS