TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Charles Gaefke
from: Jonathan de Boyne Pollard
date: 1996-11-01 02:23:28
subject: DosDevIOCtl for COM port

CG>
  > C) For DosDevIOCtl, would someone explain, in detail (if at all possible) w
  > the ParmList is, and how/when to use it.. what the DataArea is, and how/whe
  > to use it, what the ParmLengthMax, DataLengthMax, DataLengthInOut, and
  > ParmLengthInOut are, and how to use them.
CG>

  The ParmList is an area of memory that contains the "input" parameters
  to the IOCtl service, and the data area is an area of memory that
  contains the "output" parameters.

  The ParmLengthInOut and DataLengthInOut arguments to the system call are
  "in/out" arguments.  System calls can have "in"
arguments, where the
  value of the argument is used by the call, "out" arguments, which are
  set to a value by the call (they are usually implemented as pointers),
  and "in/out" arguments, which have an initial value that is modified by
  the system call (these, too, are implemented as pointers).

  ParmLengthInOut and DataLengthInOut are "in/out" arguments, which start
  off as the length of the parameters and data buffers that you are
  passing to the call, and which end up as the length of those same
  buffers that the call is "returning" to you.

  The ParmLengthMax and DataLengthMax arguments to the system call are the
  maximum lengths of the buffers, as "in" parameters.  Whatever value
  ParmLengthInOut will be set to by the call, you are guaranteed that it
  will not be greater than ParmLengthMax.

CG>
  > D) I have two .INF files that give two different specifications for the
  > DosDevIOCtl.  One needs 6 parameters, I believe, and the other needs 9.
CG>

  The one with 6 (or 5) parameters is the old OS/2 1.x 16-bit API
  function.  You won't be using this in 32-bit code.

  Watcom C++ ships with the old 16-bit OS/2 1.x Control Program Guide and
  Reference, as well as the 32-bit OS/2 2.x/3.x/4.x CP Guide and
  Reference.  This is because the 32-bit reference doesn't document the
  VIO, MOU, and KBD APIs that some people still use.  If you don't use
  the VIO, KBD, and MOU APIs, them you can just about ignore the 16-bit CP
  Guide and Reference.

  > JdeBP <
___
 X MegaMail 2.10 #0:

--- Maximus/2 3.01
* Origin: DoNoR/2,Woking UK (44-1483-725167) (2:440/4)
SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1
@PATH: 440/4 141/209 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™.