Solved

Connection on the modem

Posted on 2000-02-15
12
158 Views
Last Modified: 2010-04-04
Is it possible to send the file on the modem not using the Internet? I'd like to see the working examples of programs of sending and receiving of the file.
0
Comment
Question by:Alexei
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +4
12 Comments
 
LVL 17

Expert Comment

by:inthe
ID: 2523934
HI,
You can use a normal comport component
many here:
http://www.torry.ru/comms.htm
(most with examples)
for this just set it to ring a telephone number etc..

or use some code without component would be something like:

procedure TForm1.Button1Click(Sender: TObject);
var
  hCommFile : THandle;
  PhoneNumber : string;
  CommPort : string;
  NumberWritten : Cardinal;
begin
  PhoneNumber := 'ATDT 1-555-555-1212' + #13 + #10;
  CommPort := 'COM4';
 {Open the comm port}
  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;

 {Dial the phone}
  NumberWritten:=0;
  if WriteFile(hCommFile,
               PChar(PhoneNumber)^,
               Length(PhoneNumber),
               NumberWritten,
              nil) = false then
  begin
    ShowMessage('Unable to write to ' + CommPort);
  end else
    ShowMessage(IntToStr(NumberWritten) + ' bytes written');
  CloseHandle(hCommFile);
end;

hope that helps
Regards Barry
0
 
LVL 17

Expert Comment

by:inthe
ID: 2523950
aslo maybe see:
http://www.torry.ru/vcl/comms/telephon.zip
small component for dialing telephone .(i presume your using another modem to answer on another pc..)

also TUart and TModem on same page ..
( http://www.torry.ru/comms.htm  )
0
 
LVL 3

Expert Comment

by:Alisher_N
ID: 2524025
also if you need a sofisticated solution (s navorOtami i kuchei fishek ;)) you should find a Async Professional library - it is very diverse package...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:inthe
ID: 2524126
Hi Alisher_N ,
there is freeware version on the torrys comms page (it is ok but not as good as turbopowers),and there is also these:

http://delphree.clexpert.com/pages/projects/asyncfree/default.htm
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 2524642
Listening
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 2525056
why no using the TAPI conversion library of JEDI? ftp://delphi-jedi.org//api/TAPI.zip

see also

http://www.delphi-jedi.org/Jedi:APILIBRARY:959196211

Regards, Zif.
0
 
LVL 3

Expert Comment

by:bryan7
ID: 2525702
listenning
0
 
LVL 12

Expert Comment

by:Faruk Onder Yerli
ID: 2527251
ftp://www.ttted.org.tr/comm32.zip
you can do everything with  this component. I repair it for NT & D3-4.

0
 

Author Comment

by:Alexei
ID: 2528015
Thanks to all

But the problem still remained. The component http://www.torry.ru/vcl/comms/telephon.zip dial telephone number. The next steps are to set connection with the computer on the other side and to send the file. I'm not so good in Delphi and your help is necessary to me.

P.S. Async Professional library , ftp://delphi-jedi.org//api/TAPI.zip and ftp://www.ttted.org.tr/comm32.zip I have found, but I do not undestand its.

Please, help
0
 
LVL 12

Expert Comment

by:Faruk Onder Yerli
ID: 2530101
The comm32 is component. You must install before use it. Then its easy.
var
  Serial : TOldComPortDriver;

Serial.Connect;
Serial.Disconnect;
Serial.SendString(TmpStr : String);
Serial.SendData(DataPtr : Pointer;DataSize : integer);
                                                                    etc ...
You can see ...
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 2535705
Hi Alexei,

Here are some articles explaining TAPI and examples :

These should give you enough information to understand TAPI

Part I

http://www.DelphiZine.com/features/1998/07/di199807am_f/di199807am_f.asp

Part II

http://www.DelphiZine.com/features/1998/08/di199808am_f/di199808am_f.asp

Part III

http://www.DelphiZine.com/features/1998/09/di199809AM_f/di199809AM_f.asp

If you still have problems, just reject my answer.

Regards, Zif.
0
 

Author Comment

by:Alexei
ID: 2538334
Thanks Zif, I hope this will help
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question