{+++++++++++++++++++++++
取当前所有的拨号连接的程式;
参数为传入的列表,过程成功为参数付值且返回值为真
否则为假;
调用方法类似
if GetEntries(Memo1.Lines) then
begin
end
else
begin
end;
Date:2001/03/07 12:30-----13:32
Remark:
+++++++++++++++++++++++++++++++++++++++++++++++++++++
}
function TForm1.GetEntries(List: TStrings):Boolean;
type
TRasEntryName = record
Size : DWORD;
EntryName: array[0..256] of Char;
end;
TRasEnumEntries = function(Reserved : Pointer;
PhoneBook : Pointer;
RasEntryName : Pointer;
var cb : DWORD;
var Entries : DWORD) : DWORD; stdcall;
const
RasAPI32=''RASAPI32.dll'';
var
FRasLibHandle : THandle;
RasEntries : array[1..25] of TRasEntryName;
Size : DWORD;
Count : DWORD;
i : DWORD;
RasEnumEntries : TRasEnumEntries;
begin
// if List=Nil then Exit;
try
List.Clear;
FRasLibHandle:=LoadLibrary(RasAPI32);
try
if FRasLibHandle=0 then Exit;
{ 获取RasEnumEntriesA方法地址;本方法的关键是对RASAPI32.dll提供的方法要
熟悉,利用API过程GetProcAddress来取DLL中的方法地址,给方法指针付值后
调用,其它如拨号程式,
TRasDial = function(RasDialExtensions : Pointer;
PhoneBook : Pointer;
var RasDialParams : TRasDialParams;
NotifierType : DWORD;