TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DAVID VAN HOOSE
from: JONATHAN DE BOYNE POLLARD
date: 1998-03-09 22:15:00
subject: Comports

 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.