TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Peter Schuller
from: Marcel Vandevusse
date: 1996-08-04 00:11:08
subject: Modem and Direct Screen Writes

Replying to a message of Peter Schuller to Marcel Vandevusse:

 MV>> ulBufferLength = 4096;  
 MV>> rc = DosRead( ComHandle, pBufferArea, ulBufferLength, &BytesRead );

 PS> 4096? Is that the maximum length a commandlineparameter can be?

Actually, I have no idea what the maximum length of a command line
parameter is under OS/2. I'll have to remember to do some tests on that
some time. But this buffer here is not for the command line parameters.
This is the buffer that will receive data coming in from the com port (or
whatever else ComHandle points to, like a file or pipe).

 MV>> ulBufferLength = strlen( pBufferArea);
 MV>> rc = DosWrite( ComHandle, pBufferArea, ulBufferLength,
 MV>> &BytesWritten);

 MV>> There is one problem with the above:
 MV>> If the BBS program didn't tell the com driver to return a DosRead
 MV>> after a certain period of time has expired, even if our buffer is
 MV>> not full yet, the DosRead will never return until 4096 characters
 MV>> have been received. To prevent this, the BBS program, right after
 MV>> using DosOpen to open the com port, has to use a DosDevIoCtl call.
 MV>> For information on this, look up ioctl functions, category 1 (async
 MV>> functions), function 0x53 (set the device control block).

 PS> I'll look in to that, but that should have been taken are of already
 PS> by Maximus.

I would imagine so.

Marcel,                 Check out the baby pics; last updated on June 12, 1996:
[Team OS/2]             http://www.bright.net/~mvusse

--- FleetStreet 1.16 NR
* Origin: The Legacy Continues (1:2265/60.1)
SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/888 800/1
@PATH: 666/106 2265/60 2215/12 3615/50 396/1 270/101 712/515 711/808 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™.