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

Вниз

Помогите! Как звонить модемом   Найти похожие ветки 

 
zuber   (2002-12-03 22:40) [0]

Как звонить модемом из программы? Можно ли вызванивать в тоне по одной цифре не разрывая соединения ? И менять тон на импульс?
Заранее благодарен.


 
pfar ©   (2002-12-06 06:13) [1]

var
hCommFile : THandle;

procedure TForm1.Button1Click(Sender: TObject);
var
PhoneNumber : string;
CommPort : string;
NumberWritten : LongInt;
begin
PhoneNumber := "ATDT 1-555-555-1212" + #13 + #10;
CommPort := "COM2";
hCommFile := CreateFile(PChar(CommPort),
GENERIC_WRITE,
0,
nil,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0);
if hCommFile=INVALID_HANDLE_VALUE then
begin
ShowMessage("Unable to open "+ CommPort);
exit;
end;

NumberWritten:=0;
if WriteFile(hCommFile,
PChar(PhoneNumber)^,
Length(PhoneNumber),
NumberWritten, nil) = false then
begin
ShowMessage("Unable to write to " + CommPort);
end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
{Close the port}
CloseHandle(hCommFile);
end;



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

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

Наверх




Память: 0.46 MB
Время: 0.016 c
1-28828
158963
2003-02-02 17:44
2003.02.10
I need help. please


1-28923
Max_
2003-01-30 20:21
2003.02.10
Дата


8-28950
dima1
2002-10-02 02:19
2003.02.10
Кодек для AVI


1-28793
tv
2003-01-30 10:11
2003.02.10
Смена кодировеки в TWebBrowser


14-29080
Mischka
2003-01-21 13:13
2003.02.10
Программирование доказывает или отрицает существование Бога?