Главная страница
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.01 c
1-28750
Fvv
2003-01-31 10:25
2003.02.10
DragAndDrop из внешних програм


14-29097
Думкин
2003-01-24 06:47
2003.02.10
Ощущения


3-28584
Стас
2003-01-21 14:26
2003.02.10
Фигня с TDateTime


14-28998
Случайный прохожий
2003-01-26 22:42
2003.02.10
Кто, что об этом думает?


14-29048
hatchy
2003-01-24 15:24
2003.02.10
Один из анекдотов..