Главная страница
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.033 c
1-96841
Palladin
2003-01-21 06:03
2003.01.30
А мона ли... ?


14-96942
Анатолий
2003-01-11 19:44
2003.01.30
Хелп...


1-96752
neodiX
2003-01-21 19:06
2003.01.30
Перерисовка формы, когда она выходит за границы экрана


6-96936
NewGuest
2002-12-06 19:33
2003.01.30
Мастера, раз в D7 не установлены компаненты типа TclientSocket,то


3-96628
Kurt_
2003-01-14 09:40
2003.01.30
Обьясните плиз что значит значение для CursorType (АДО) - OpenFor