## Virtual Device Driver Reference for OS/2

[prev][next][parent][TOC]

### VDHDevIOCtl

Select an item:

    Format
    Parameters
    Return Codes
    Purpose
    Glossary

This function allows a virtual device driver to send device-specific commands to a physical device driver through the generic IOCtl interface. The parameters and error return codes are identical to the ones found in the DosDevIOCtl API. Refer to the OS/2 Control Program Programming Reference for a complete description of each DosDevIOCtl API parameter.

    #include mvdm.h

    HFILE     DevHandle;        /*  Device handle returned by VDHOpen or VDHPhysicalDisk */

    ULONG     Category;         /*  Category of function performed */

    ULONG     Function;         /*  Function within category performed */

    PVOID     ParmList;         /*  Pointer to command-specific input parameter area */

    ULONG     ParmLengthMax;    /*  Maximum size of input parameter area, in bytes */

    PULONG    ParmLengthInOut;  /*  Pointer to length of the parameters passed, in bytes */

    PVOID     DataArea;         /*  Pointer to the data area */

    ULONG     DataLengthMax;    /*  Maximum size of the parameters passed, in bytes */

    PULONG    DataLengthInOut;  /*  Pointer to length of the parameters passed, in bytes */

    HFILE     rc;

    rc = VDHDevIOCtl(DevHandle, Category, Function,

           ParmList, ParmLengthMax, ParmLengthInOut,

           DataArea, DataLengthMax, DataLengthInOut);