Performs control functions on a device specified by an opened device handle.

#define INCL_DOSDEVICES
#define INCL_DOSDEVIOCTL
#include <os2.h>

HFILE     hDevice;       /*  Device handle returned by DosOpen, or a standard (open) device handle. */
ULONG     category;      /*  Device category. */
ULONG     function;      /*  Device-specific function code. */
PVOID     pParams;       /*  Address of the command-specific argument list. */
ULONG     cbParmLenMax;  /*  Length, in bytes, of pParams. */
PULONG    pcbParmLen;    /*  Pointer to the length of parameters. */
PVOID     pData;         /*  Address of the data area. */
ULONG     cbDataLenMax;  /*  Length, in bytes, of pData. */
PULONG    pcbDataLen;    /*  Pointer to the length of data. */
APIRET    ulrc;          /*  Return Code. */

ulrc = DosDevIOCtl(hDevice, category, function,
         pParams, cbParmLenMax, pcbParmLen,
         pData, cbDataLenMax, pcbDataLen);


[Back] [Next]