i: integer; begin i:=FRasEntries.IndexOf(AEntryName); if i=-1 then Exit; FRasEntries.Delete(i); if AEntryName=EntryName then if FRasEntries.Count>0 then EntryName:=FRasEntries.Strings[0] else EntryName:=''''''''; RasDeleteEntry(nil,PChar(AEntryName)); end;
Api声明:
function RasDial( lpRasDialExtensions: PRASDIALEXTENSIONS; lpszPhonebook: LPCTSTR; lpRasDialParams: LPRASDIALPARAMS; dwNotifierType: DWORD; lpvNotifier: Pointer; lphRasConn: LPHRASCONN): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasDialA'''';
function RasHangUp(rasconn: HRASCONN): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasHangUpA'''';
function RasGetEntryDialParams( lpszPhonebook: LPCTSTR; lprasdialparams: LPRASDIALPARAMS; lpfPassword: LPBOOL): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasGetEntryDialParamsA'''';
function RasEnumEntries( reserved: LPCTSTR; lpszPhonebook: LPCTSTR; lprasentryname: LPRASENTRYNAME; lpcb: LPDWORD; lpcEntries: LPDWORD): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasEnumEntriesA'''';
function RasEditPhonebookEntry( hwnd: HWND; lpszPhonebook: LPCTSTR; lpszEntryName: LPCTSTR): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasEditPhonebookEntryA'''';
function RasGetEntryProperties( lpszPhonebook: LPCTSTR; lpszEntry: LPCTSTR; lpRasEntry: LPRASENTRY; lpdwEntryInfoSize: LPDWORD; lpbDeviceInfo: PBYTE; lpdwDeviceInfoSize: LPDWORD): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasGetEntryPropertiesA'''';
function RasSetEntryProperties( lpszPhonebook: LPCTSTR; lpszEntry: LPCTSTR; lpRasEntry: LPRASENTRY; dwEntryInfoSize: DWORD; lpbDeviceInfo: PByte; dwDeviceInfoSize: DWORD): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasSetEntryPropertiesA'''';
function RasEnumConnections( lprasconn: LPRASCONN; lpcb: LPDWORD; lpcConnections: LPDWORD): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasEnumConnectionsA'''';
function RasEnumDevices( lpRasDevInfo: LpRasDevInfo; lpcb: LPDWORD; lpcdevices: LPDWORD): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasEnumDevicesA'''';
function RasCreatePhonebookEntry( Handle: Hwnd; LpszPhoneBook: PChar): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasCreatePhonebookEntryA'''';
function RasDeleteEntry( lpszPhonebook: PChar; lpszEntry: PChar): DWORD; stdcall; external ''''RASAPI32.dll'''' name ''''RasDeleteEntryA'''';
上一页 [1] [2] 没有相关教程
|