Solved

Connection on the modem

Posted on 2000-02-15
12
153 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

920 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

12 Experts available now in Live!

Get 1:1 Help Now