RasCreatePhonebookEntry function

[This function has been deprecated as of Windows Vista and its functionality has been replaced by RasDialDlg. ]

The RasCreatePhonebookEntry function creates a new phone-book entry. The function displays a dialog box in which the user types information for the phone-book entry.

Syntax


DWORD RasCreatePhonebookEntry(
  _In_ HWND    hwnd,
  _In_ LPCTSTR lpszPhonebook
);

Parameters

hwnd [in]

Handle to the parent window of the dialog box.

lpszPhonebook [in]

Pointer to a null-terminated string that specifies the full path and file name of a phone-book (PBK) file. If this parameter is NULL, the function uses the current default phone-book file. The default phone-book file is the one selected by the user in the User Preferences property sheet of the Dial-Up Networking dialog box.

Return value

If the function succeeds, the return value is ERROR_SUCCESS.

If the function fails, the return value is one of the following error codes or a value from Routing and Remote Access Error Codes or Winerror.h.

Return codeDescription
ERROR_CANNOT_OPEN_PHONEBOOK

The phone book is corrupted or missing components.

 

Remarks

When calling RasDialDlg, set each member of the RASDIALDLG structure passed to lpInfo to zero except:

  • dwSize = sizeof(RASDIALDLG)
  • hwndOwner = the hwnd parameter above
  • dwFlags = RASEDFLAG_NewEntry

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

End of client support

Windows XP

End of server support

Windows Server 2003

Header

Ras.h

Library

Rasapi32.lib

DLL

Rasapi32.dll

Unicode and ANSI names

RasCreatePhonebookEntryW (Unicode) and RasCreatePhonebookEntryA (ANSI)

See also

Remote Access Service (RAS) Overview
Remote Access Service Functions
RasEditPhonebookEntry
RasEntryDlg
RasGetEntryDialParams
RasSetEntryDialParams

 

 

Community Additions

ADD
Show: