Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.01.30;
Скачать: CL | DM;

Вниз

ras и телефоны   Найти похожие ветки 

 
Свой ©   (2002-12-03 19:21) [0]

Не могу получить телефоны на установку соединений привожу код обьясните что не так!!!
вот обьявления
var
dialparams: TRasDialParams;
s1,s2,s3:string;//имена соединений
t1,t2,t3:string; //телефоны
l1,l2,l3:string; //логины
p1,p2,p3:string; //пароли
sin: TSockAddrIn;
buf: array[0..255] of char;
bufsize: Longint;
numEntries: Longint;
entries: Array[1..3] of TRasEntryName;
x: Integer;
fp: LongBool;
r: Longint;

теперь процедуры
procedure polcoed;
begin
entries[1].dwSize := SizeOf(TRasEntryName);
bufsize := SizeOf(TRasEntryName) * 3;

if RasEnumEntries(nil, nil, @entries[1], bufsize, numEntries) = 0 then
begin
if numEntries > 0 then
begin
for x:= 1 to numEntries do
begin
if s1="" then s1:=entries[x].szEntryName
else
if s2="" then s2:=entries[x].szEntryName
else s3:=entries[x].szEntryName ;
end;
end;
end
end;

procedure logpas;
begin
FillChar(dialparams, SizeOf(TRasDialParams), 0);
dialparams.dwSize:=Sizeof(TRasDialParams);
for i:=1 to 3 do
begin
if i=1 then strpcopy(DialParams.szEntryName,s1);
if i=2 then strpcopy(DialParams.szEntryName,s2);
if i=3 then strpcopy(DialParams.szEntryName,s3);
r := RasGetEntryDialParams(nil, dialparams, fp);
if r = 0 then
with dialparams do
begin
if i=1 then
begin
l1:=szUserName;
t1:=szPhoneNumber;
if fp then
p1:=szPassword
else p1:="нет";
end;
if i=2 then
begin
l2:=szUserName;
t2:=szPhoneNumber;
if fp then
p2:=szPassword
else p2:="нет";
end;
if i=3 then
begin
l3:=szUserName;
t3:=szPhoneNumber;
if fp then
p3:=szPassword
else p3:="нет";
end;
end;
end;
end;


 
Свой ©   (2002-12-04 17:15) [1]

ну помогите
надо типа очень


 
Yurko ©   (2002-12-05 02:19) [2]

Выслал тебе на мыло пример.


 
Свой ©   (2002-12-05 18:14) [3]

Спасибо!!!


 
Свой ©   (2002-12-05 22:43) [4]

Тут немного разобрасля но не понял до конца и ниче не получилось !!!
Попробую подругому может кто так поможет
Мне надо узнать номера телефонов(по которым звонить) на модемное соединение
вот этой функцией получают всю информацию о соединениях


DWORD RasGetEntryDialParams(

LPTSTR lpszPhonebook, // pointer to the full path and filename of the phone-book file
LPRASDIALPARAMS lprasdialparams, // pointer to a structure that receives the connection parameters
LPBOOL lpfPassword // indicates whether the user"s password was retrieved
);

вот что сказано по поводу телефонов

Parameters

lpszPhonebook

Windows NT: Pointer to a null-terminated string that specifies the full path and filename 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.
Windows 95: Dial-up networking stores phone-book entries in the registry rather than in a phone-book file.

Не могли бы Вы многоуважаемые подсказать как это можно исправить или где в реестре можно узнать номера телефонов ???



Страницы: 1 вся ветка

Текущий архив: 2003.01.30;
Скачать: CL | DM;

Наверх




Память: 0.48 MB
Время: 0.015 c
14-96953
cc43294
2003-01-12 14:27
2003.01.30
Почта


3-96618
Viktor1
2003-01-14 05:22
2003.01.30
Какую базу лучше всего использовать на CD?


3-96590
Natalie
2003-01-07 11:04
2003.01.30
ну не ужели никто не знает как перейти на новую страницу!!!!


7-97060
LexusU
2002-11-20 11:46
2003.01.30
Как узнать нажата ли Caps Lock и какой язык ?


3-96585
Rustik
2003-01-13 13:01
2003.01.30
Как из предыдущей формы поднять значение db.text компонента