Главная страница
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.02 c
1-28724
KA_
2003-01-31 17:50
2003.02.10
TRichEdit


1-28771
Zhker
2003-01-26 20:05
2003.02.10
Tray


7-29118
zuber
2002-12-03 22:40
2003.02.10
Помогите! Как звонить модемом


1-28744
Alpine
2003-02-01 03:39
2003.02.10
Как очищать Canvas ??


3-28627
Jan
2003-01-23 12:37
2003.02.10
Вопрос