DVH> I am trying to transfer information across my modem to a remote user
DVH> so I can make a door for my BBS. I am using Borland C++ for OS/2
DVH> v2.0..
Well, in OS/2 a COM device can be treated as a file, so the easiest way to
use it is to open and use the COM device just as one would a file:
ofstream modem("COM4", ios::out|ios::binary) ;
modem << "ATZ\r" << flush ;
If you are making a door, then you need to find out how your BBS program
passes the COM device to the door program. With most decent OS/2 BBS
softwares, the door program is spawned as a child process of the BBS program
(the batch-file-in-a-loop system used by DOS BBSes is, in fact, *bad* design
for an OS/2 BBS), and inherits an open file handle to the COM device, the
number of which is passed as an argument on the command line, or in a door
information file of some sort. Even then, however, it's just a matter of
associating a stream object with the right file handle.
¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)
|