TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Danny Tseng
from: Billy O`Connor
date: 1994-09-09 09:07:12
subject: BBS Door programming und

>    Could someone suggest me some reading materials in writing OS/2 verions
 >of doors for BBS. Or please show me a piece of code which can be used to
 >replace 'cin' or 'cout' and directly control serial port. Thanks a lot.

Hi, Danny.
You can use DosOpen, DosRead and DosWrite to replace cin, cout.  Also, use
DosDevIOCtl to set modem parameters and line settings, i.e.,  

  DosDevIOCtl(hfCom,IOCTL_ASYNC,ASYNC_SETBAUDRATE,&speed,
              sizeof(USHORT), NULL, NULL, 0L, NULL);

  DosOpen("COM2", &hfCom, &ulAc, 0L, 0, FILE_OPEN,
    OPEN_ACCESS_READWRITE | OPEN_FLAGS_FAIL_ON_ERROR, 0L);

  DosRead(hfCom, (PVOID) & ch, 1L, &BytesRead);

  DosWrite(hfCom, &ch, sizeof(ch), &BytesWritten);
___
 * MR/2 2.05 NR * billyoc{at}netcom.com

--- Maximus/2 2.01wb

* Origin: WayStar BBS (1:333/14)
SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413
SEEN-BY: 711/430 807 808 809 934 942 712/353 623 713/888 800/1
@PATH: 333/14 405 101/180 324/288 3615/50 229/2 12/2442 711/409 54/54 711/808
@PATH: 711/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™.