Solved

Connection on the modem

Posted on 2000-02-15
12
155 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help on project with Soap 10 53
Delphi Yen format 3 34
DBGrid or StringGrid ? 6 88
Slow Restore if incremental backups using RDiff.exe 4 19
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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