Solved

Connection on the modem

Posted on 2000-02-15
12
152 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
 
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now