TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Jim Woodward
from: hugo landsman
date: 1996-01-23 16:00:44
subject: OS/2 Comm programming

hi Jim,

 >> I wrote a program that answers the phone, gets the CID info and
 >> then creates a batch file which loads Maximus.
 JdBP> Incidentally, you don't need kludges like this in OS/2.  This approach
 JdBP> is DOS-think, and stems from the fact that a batch file in DOS has a
 JdBP> smaller memory footprint than a full-blown executable.
 JW> Either you don't understand my problem, or I don't understand you.
 JW> What I've written is a small frontend which answers the phone
 JW> collects data and then passes the baton. Binkley/2 does it exactly as
 JW> I did. Also I would, when possible, like to develop my BBS utilities
 JW> for both dos and OS/2, since Maximus comes in both flavours.

With DOS, you can use a batch file like:

 {at}echo off
 GET_CID.COM
 call LOAD-MAX.BAT

With OS/2, you cannot, as the operating system regards the opened COM port
like any other file: it gets closed when GET_CID2.EXE exits, and the caller
is hung-up on.  To load MAXP, you must pass it the opened handle of the
port, and use spawn**(), DosProgram(), DosStartSession([inherit]) (or, with
the useless overhead of CMD.EXE, system("LOAD-MAX.CMD")). 
Whatever you printed to LOAD-MAX.BAT, would be better printed to the
spawn**()/etc. parameters. MAXP doesn't requier CMD.EXE to operate. 
Binkley/2 is not a fine example: it even lets you break it by specifing
BBSEXIT...

regards,
         hugo
* Origin: huug{at}telebyte.nl (2:283/608.5)
SEEN-BY: 50/99 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 283/608 2801/201 28/777 2/777 396/1 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

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™.