Deleting a Phone-Book Entry

To delete a phone-book entry the application can use the RasDeleteEntry function.

    To delete a phone-book entry from the dialing list

  1. Call RasDeleteEntry using the lpszName parameter to supply the entry to be deleted.
  2. The return value is TRUE if successful, and FALSE if not.

The following code example shows how to delete a RAS phone-book entry from the dialing list.

BOOL DeleteRasEntry (LPTSTR lpszName)
{
  DWORD dwError;            // Return code from RasDeleteEntry
  TCHAR szError[100];       // Buffer for error message 

  if (dwError = RasDeleteEntry (NULL, lpszName))
  {
    wsprintf (szError, TEXT("Unable to delete entry: %ld"), dwError);
    return FALSE;
  }

  return TRUE;
}