PlatformVB

RASRenameEntry

The following function will rename an entry.

 

Declare Function RasRenameEntry _
      Lib "rasapi32.dll" Alias "RasRenameEntryA" _
        (ByVal lpszPhonebook As String, _
        ByVal lpszOldEntry As String, _
        ByVal lpszNewEntry As String) As Long

If successful it will return 0.

The following is an example:

Dim rtn As Long
rtn = RasRenameEntry(vbNullString, "My Connection", "My New Name")
If rtn <> 0 Then
   MsgBox VBRASErrorHandler(rtn)
End If

 

See Also: Contents, Introduction, RasEnumEntries, RasErrorHandler.