Solved

Connection on the modem

Posted on 2000-02-15
12
156 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
  • 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…

839 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