Jump to content

PDDREF:Generic IOCtl Commands: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
No edit summary
 
(19 intermediate revisions by 2 users not shown)
Line 3: Line 3:


The category and function fields are as follows. Each code is contained in a byte:
The category and function fields are as follows. Each code is contained in a byte:
  Category       Code
{|class="wikitable"
0xxx xxxx       OS/2-defined
!Category||Code
1xxx xxxx       User-defined
|-
_xxx xxxx       Code.  
|0xxx xxxx||OS/2-defined
|-
|1xxx xxxx||User-defined
|-
|_xxx xxxx||Code.
|}
 
{|class="wikitable"
!Function||Code
|-
|Return error, if unsupported||0xxx xxxx
|-
|Ignore, if unsupported||1xxx xxxx
|-
|Intercepted by the OS/2 operating system||x0xx xxxx
|-
|Passed to driver||x1xx xxxx
|-
|Sends data and commands to device||xx0x xxxx
|-
|Queries data and information from device||xx1x xxxx
|-
|Subfunction||___x xxxx
|}


    Function        Code
0xxx xxxx        Return error, if unsupported
1xxx xxxx        Ignore, if unsupported
x0xx xxxx        Intercepted by the OS/2 operating system
x1xx xxxx        Passed to driver
xx0x xxxx        Sends data and commands to device
xx1x xxxx        Queries data and information from device
___x xxxx        Subfunction.
Notice that the send/query data bit is intended only to standardize the function set; it plays no critical role. Some functions can contain both command and query elements. Such commands are defined as sends data.
Notice that the send/query data bit is intended only to standardize the function set; it plays no critical role. Some functions can contain both command and query elements. Such commands are defined as sends data.


Line 66: Line 81:
==Generic IOCtl Function Table==
==Generic IOCtl Function Table==
The list of categories and functions for the generic IOCtl requests are as follows:
The list of categories and functions for the generic IOCtl requests are as follows:
<PRE>
{|class="wikitable"
Category ³Function  ³Description
!Category||Function||Description
    01h   ³          ³Serial Device Control
|-
          ³  14h   ³Reserved                                ³
|rowspan=28|01h|| ||Serial Device Control
          ³  34h   ³Reserved                                ³
|-
          ³  41h   ³Set Bit Rate                           ³
|14h||Reserved
          ³  42h   ³Set Line Characteristics (stop, parity, data bits)
|-
          ³  43h   ³Extended Set Bit Rate                   ³
|34h||Reserved
          ³  44h   ³Transmit Byte Immediate                 ³
|-
          ³  45h   ³Set Break OFF                           ³
|41h||Set Bit Rate
          ³  46h   ³Set Modem Control Signals               ³
|-
          ³  47h   ³Behave As If XOFF Received (stop transmit)
|42h||Set Line Characteristics (stop, parity, data bits)
          ³  48h   ³Behave As If XON Received (start transmit)
|-
          ³  49h   ³Reserved                                ³
|43h||Extended Set Bit Rate
          ³  4Bh   ³Set Break ON                           ³
|-
          ³  53h   ³Set Device Control Block (DCB) Parameters
|44h||Transmit Byte Immediate
          ³  54h   ³Set Enhanced Mode Parameters           ³
|-
          ³  61h   ³Query Current Bit Rate                 ³
|45h||Set Break OFF
          ³  62h   ³Query Line Characteristics             ³
|-
          ³  63h   ³Extended Query Bit Rate                 ³
|46h||Set Modem Control Signals
          ³  64h   ³Query COM Status                       ³
|-
          ³  65h   ³Query Transmit Data Status             ³
|47h||Behave As If XOFF Received (stop transmit)
          ³  66h   ³Query Modem Control Output Signals     ³
|-
          ³  67h   ³Query Current Modem Input Signals       ³
|48h||Behave As If XON Received (start transmit)
          ³  68h   ³Query Number of Characters in Receive Queue
|-
          ³  69h   ³Query Number of Characters in Transmit Queue
|49h||Reserved
          ³  6Dh   ³Query COM Error                         ³
|-
          ³  72h   ³Query COM Event Information             ³
|4Bh||Set Break ON
          ³  73h   ³Query Device Control Block (DCB) Parameters
|-
          ³  74h   ³Query Enhanced Mode Parameters         ³
|53h||Set Device Control Block (DCB) Parameters
    02h   ³          ³Reserved                                ³
|-
    03h   ³          ³Video Control                           ³
|54h||Set Enhanced Mode Parameters
          ³  70h   ³Allocate an LDT Selector               ³
|-
          ³  71h   ³Deallocate an LDT Selector             ³
|61h||Query Current Bit Rate
          ³  72h   ³Query Pointer Draw Address             ³
|-
          ³  73h   ³Initialize Call Vector Table           ³
|62h||Query Line Characteristics
          ³  74h   ³ABIOS Pass-Through                     ³
|-
          ³  75h   ³Allocate an LDT Selector with Offset   ³
|63h||Extended Query Bit Rate
          ³  76h   ³Allocate an LDT Selector with Background Validation Options
|-
          ³  7Eh   ³Allocate Video Buffer                   ³
|64h||Query COM Status
          ³  7Fh   ³Get Address to ROM Font                 ³
|-
    04h   ³          ³Keyboard Control                       ³
|65h||Query Transmit Data Status
          ³  50h   ³Set Code Page                           ³
|-
          ³  51h   ³Set Input Mode (Default ASCII)         ³
|66h||Query Modem Control Output Signals
          ³  52h   ³Set Interim Character Flags             ³
|-
          ³  53h   ³Set Shift State                         ³
|67h||Query Current Modem Input Signals
          ³  54h   ³Set Typematic Rate and Delay           ³
|-
          ³  55h   ³Reserved                                ³
|68h||Query Number of Characters in Receive Queue
          ³  56h   ³Set Session Manager Hot Key             ³
|-
          ³  57h   ³Set KCB                                 ³
|69h||Query Number of Characters in Transmit Queue
          ³  58h   ³Set Code Page Number                   ³
|-
          ³  59h   ³Set Read/Peek Notification             ³
|6Dh||Query COM Error
          ³  5Ah   ³Alter Keyboard LEDs                     ³
|-
          ³  5Bh   ³Reserved                                ³
|72h||Query COM Event Information
          ³  5Ch   ³Set NLS and Custom Code Page           ³
|-
          ³  5Dh   ³Create New Logical Keyboard             ³
|73h||Query Device Control Block (DCB) Parameters
          ³  5Eh   ³Destroy Logical Keyboard               ³
|-
          ³  71h   ³Query Input Mode                       ³
|74h||Query Enhanced Mode Parameters
          ³  72h   ³Query Interim Character Flags           ³
|-
          ³  73h   ³Query Shift State                       ³
|02h|| ||Reserved
          ³  74h   ³Read Character Data Records             ³
|-
          ³  75h   ³Peek Character Data Record             ³
|rowspan=10|03h|| ||Video Control
          ³  76h   ³Query Session Manager Hot Key           ³
|-
          ³  77h   ³Query Keyboard Type                     ³
|70h||Allocate an LDT Selector
          ³  78h   ³Query Code Page Number                 ³
|-
          ³  79h   ³Translate Scan Code to ASCII           ³
|71h||Deallocate an LDT Selector
          ³  7Ah   ³Query Keyboard Hardware ID             ³
|-
          ³  7Bh   ³Query Keyboard Code Page Support Information
|72h||Query Pointer Draw Address
    05h   ³          ³Parallel Port Control                   ³
|-
          ³  42h   ³Set Frame Control (CPL, LPI)           ³
|73h||Initialize Call Vector Table
          ³  43h   ³Reserved                                ³
|-
          ³  44h   ³Set Infinite Retry                     ³
|74h||ABIOS Pass-Through
          ³  45h   ³Reserved                                ³
|-
          ³  46h   ³Initialize Parallel Port               ³
|75h||Allocate an LDT Selector with Offset
          ³  47h   ³Reserved                                ³
|-
          ³  48h   ³Activate Font                           ³
|76h||Allocate an LDT Selector with Background Validation Options
          ³  49h   ³Reserved                                ³
|-
          ³  4Bh   ³Reserved                                ³
|7Eh||Allocate Video Buffer
          ³  4Ch   ³Reserved                                ³
|-
          ³  4Dh   ³Set Print-Job Title                     ³
|7Fh||Get Address to ROM Font
          ³  4Eh   ³Set Parallel Port Write Time-Out Value ³
|-
          ³  4Fh   ³Reserved                                ³
|rowspan=27|04h|| ||Keyboard Control
          ³  50h   ³Reserved                                ³
|-
          ³  51h   ³Reserved                                ³
|50h||Set Code Page
          ³  52h   ³Set Parallel Port Communication Mode   ³
|-
          ³  53h   ³Set Parallel Port Data Transfer Mode   ³
|51h||Set Input Mode (Default ASCII)
          ³  62h   ³Query Frame Control                     ³
|-
          ³  63h   ³Reserved                                ³
|52h||Set Interim Character Flags
          ³  64h   ³Query Infinite Retry                   ³
|-
          ³  65h   ³Reserved                                ³
|53h||Set Shift State
          ³  66h   ³Query Parallel Port Status             ³
|-
          ³  67h   ³Reserved                                ³
|54h||Set Typematic Rate and Delay
          ³  68h   ³Reserved                                ³
|-
          ³  69h   ³Query Active Font                       ³
|55h||Reserved
          ³  6Ah   ³Verify Font                             ³
|-
          ³  6Bh   ³Reserved                                ³
|56h||Set Session Manager Hot Key
          ³  6Ch   ³Reserved                                ³
|-
          ³  6Dh   ³Reserved                                ³
|57h||Set KCB
          ³  6Eh   ³Query Parallel Port Write Time-Out Value³
|-
          ³  6Fh   ³Reserved                                ³
|58h||Set Code Page Number
          ³  70h   ³Reserved                                ³
|-
          ³  71h   ³Reserved                                ³
|59h||Set Read/Peek Notification
          ³  72h   ³Query Parallel Port Communication Mode ³
|-
          ³  73h   ³Query Parallel Port Data Transfer Mode ³
|5Ah||Alter Keyboard LEDs
          ³  74h   ³Query Parallel Port Device ID           ³
|-
    06h   ³          ³Light Pen Control                       ³
|5Bh||Reserved
    07h   ³          ³Mouse Control                           ³
|-
          ³  50h   ³Reserved                                ³
|5Ch||Set NLS and Custom Code Page
          ³  51h   ³Notification of Display Mode Change     ³
|-
          ³  52h   ³Reserved                                ³
|5Dh||Create New Logical Keyboard
          ³  53h   ³Reassign Current Mouse Scaling Factors ³
|-
          ³  54h   ³Assign New Mouse Event Mask             ³
|5Eh||Destroy Logical Keyboard
          ³  55h   ³Reassign Mouse Threshold Values         ³
|-
          ³  56h   ³Set Pointer Shape                       ³
|71h||Query Input Mode
          ³  57h   ³Unmark Collision Area                   ³
|-
          ³  58h   ³Mark Collision Area                     ³
|72h||Query Interim Character Flags
          ³  59h   ³Specify/Replace Pointer Screen Position ³
|-
          ³  5Ah   ³Set OS/2-Mode Pointer Draw Device Driver Address
|73h||Query Shift State
          ³  5Bh   ³Reserved                                ³
|-
          ³  5Ch   ³Set Current Physical Mouse Device Driver Status Flags
|74h||Read Character Data Records
          ³  5Dh   ³Notification of Mode Switch Completion ³
|-
          ³  60h   ³Query Number of Mouse Buttons Supported ³
|75h||Peek Character Data Record
          ³  61h   ³Query Mouse Device Motion Sensitivity   ³
|-
          ³  62h   ³Query Current Physical Mouse Device Driver Status Flags
|76h||Query Session Manager Hot Key
          ³  63h   ³Read Mouse Event Queue                 ³
|-
          ³  64h   ³Query Current Event Queue Status       ³
|77h||Query Keyboard Type
          ³  65h   ³Query Current Mouse Event Mask         ³
|-
          ³  66h   ³Query Current Mouse Scaling Factors     ³
|78h||Query Code Page Number
          ³  67h   ³Query Current Pointer Screen Position   ³
|-
          ³  68h   ³Query Current Pointer Shape             ³
|79h||Translate Scan Code to ASCII
          ³  69h   ³Query Mouse Threshold Values           ³
|-
          ³  6Ah   ³Query Physical Mouse Device Driver Level/Version
|7Ah||Query Keyboard Hardware ID
          ³  6Bh   ³Query Pointing Device ID               ³
|-
    08h   ³          ³Logical Disk Control                   ³
|7Bh||Query Keyboard Code Page Support Information
          ³  00h   ³Lock Drive                             ³
|-
          ³  01h   ³Unlock Drive                           ³
|rowspan=37|05h|| ||Parallel Port Control
          ³  02h   ³Redetermine Media (end format)         ³
|-
          ³  03h   ³Set Logical Map                         ³
|42h||Set Frame Control (CPL, LPI)
          ³  04h   ³Begin Format                           ³
|-
          ³  20h   ³Block Removable                         ³
|43h||Reserved
          ³  21h   ³Query Logical Map                       ³
|-
          ³  22h   ³Reserved                                ³
|44h||Set Infinite Retry
          ³  40h   ³Removable Media Control                 ³
|-
          ³  43h   ³Set Device Parameters                   ³
|45h||Reserved
          ³  44h   ³Write/Read/Verify Track                 ³
|-
          ³  45h   ³Format and Verify Track                 ³
|46h||Initialize Parallel Port
          ³  5Dh   ³Diskette Control                       ³
|-
          ³  5Eh   ³Reserved                                ³
|47h||Reserved
          ³  5Fh   ³Reserved                                ³
|-
          ³  60h   ³Query Media Sense                       ³
|48h||Activate Font
          ³  63h   ³Query Device Parameters                 ³
|-
          ³  66h   ³Status                                  ³
|49h||Reserved
    09h   ³          ³Physical Disk Control                   ³
|-
          ³  00h   ³Lock Physical Drive                     ³
|4Bh||Reserved
          ³  01h   ³Unlock Physical Drive                   ³
|-
          ³  44h   ³Physical Write Track                   ³
|4Ch||Reserved
          ³  63h   ³Query Physical Device Parameters       ³
|-
          ³  64h   ³Physical Read Track                     ³
|4Dh||Set Print-Job Title
          ³  65h   ³Physical Verify Track                   ³
|-
    0Ah   ³          ³Character Device Monitor Control       ³
|4Eh||Set Parallel Port Write Time-Out Value
          ³  40h   ³Register Monitor                       ³
|-
    0Bh   ³          ³General Device Control                 ³
|4Fh||Reserved
          ³  01h   ³Flush Input Buffer                     ³
|-
          ³  02h   ³Flush Output Buffer                     ³
|50h||Reserved
          ³  41h   ³System Notifications for Physical Device³
|-
          ³          ³Drivers                                ³
|51h||Reserved
          ³  60h   ³Query Monitor Support                   ³
|-
    0Ch   ³          ³Advanced Power Management               ³
|52h||Set Parallel Port Communication Mode
          ³  40h   ³Send Power Event                       ³
|-
          ³  41h   ³Set Power Event Res                     ³
|53h||Set Parallel Port Data Transfer Mode
          ³  42h   ³Reserved                                ³
|-
          ³  60h   ³Query Power Status                     ³
|62h||Query Frame Control
          ³  61h   ³Query Power Event                       ³
|-
          ³  62h   ³Query PowerInfo                         ³
|63h||Reserved
  0Dh-7Fh³          ³Reserved Category Codes                 ³
|-
    80h   ³          ³Screen Control                         ³
|64h||Query Infinite Retry
          ³  00h   ³Get Current Video Memory Bank           ³
|-
          ³  01h   ³Set Current Video Memory Bank           ³
|65h||Reserved
          ³  02-07Fh³Reserved                                ³
|-
          ³  08h   ³Return Adapter Video Configuration     ³
|66h||Query Parallel Port Status
          ³  09h   ³Return Manufacturer-Specific Adapter Data
|-
          ³  0Ah   ³Update Adapter Video Information       ³
|67h||Reserved
          ³  0Bh   ³Return Linear Address Mapped to Physical Address
|-
          ³0Ch-07Fh ³Reserved
|68h||Reserved
    80h   ³          ³OEMHLP Controls                         ³
|-
          ³  00h   ³Query OEM Adaptation Information       ³
|69h||Query Active Font
          ³  01h   ³Query Machine Information               ³
|-
          ³  02h   ³Query Display Combination Code         ³
|6Ah||Verify Font
          ³  03h   ³Return Video Fonts                     ³
|-
          ³  04h   ³Read EISA Configuration                 ³
|6Bh||Reserved
          ³          ³Information-Subfunction 00             ³
|-
          ³  04h   ³Read EISA Function                     ³
|6Ch||Reserved
          ³          ³Information-Subfunction 01             ³
|-
          ³  05h   ³Query ROM BIOS Information             ³
|6Dh||Reserved
          ³  06h   ³Query Miscellaneous Video Information   ³
|-
          ³  07h   ³Query Video Adapter                     ³
|6Eh||Query Parallel Port Write Time-Out Value
          ³  08h   ³Query SVGA Information                 ³
|-
          ³  09h   ³Query Memory Information               ³
|6Fh||Reserved
          ³  0Ah   ³Query, Display Mode, Query, and Set     ³
|-
          ³          ³(DMQS) Information                     ³
|70h||Reserved
          ³  0Bh   ³Access PCI BIOS                         ³
|-
          ³  0Bh   ³Query PCI BIOS - Subfunction 00h       ³
|71h||Reserved
          ³  0Bh   ³Find PCI Device - Subfunction 01h       ³
|-
          ³  0Bh   ³Find PCI Class Code - Subfunction 02h   ³
|72h||Query Parallel Port Communication Mode
          ³  0Bh   ³Read PCI Configuration Space -         ³
|-
          ³          ³Subfunction 03h                        ³
|73h||Query Parallel Port Data Transfer Mode
          ³  0Bh   ³Write PCI Configuration Space -
|-
          ³          ³Subfunction 04h
|74h||Query Parallel Port Device ID
    80h   ³          ³TESTCFG.SYS                             ³
|-
          ³  40h   ³Obtain a Copy of BIOS/Adapter Memory   ³
|06h|| ||Light Pen Control
          ³  41h   ³Issue an "IN" I/O Instruction           ³
|-
          ³  42h   ³Issue an "OUT" I/O Instruction         ³
|rowspan=27|07h|| ||Mouse Control
          ³  60h   ³Query Bus Architecure Function         ³
|-
          ³  61h   ³Return All POS IDs                     ³
|50h||Reserved
          ³  62h   ³Return All EISA IDs                     ³
|-
    80h   ³          ³Resource Manager                       ³
|51h||Notification of Display Mode Change
          ³  01h   ³Get Resource Manager Node Information   ³
|-
          ³  02h   ³Enumerate Resource Manager Nodes       ³
|52h||Reserved
    80h   ³          ³CD-ROM Drive and Disc Control           ³
|-
          ³  40h   ³Reset Drive                             ³
|53h||Reassign Current Mouse Scaling Factors
          ³  44h   ³Eject Disk                             ³
|-
          ³  45h   ³Close Tray                             ³
|54h||Assign New Mouse Event Mask
          ³  46h   ³Lock/Unlock Door                       ³
|-
          ³  50h   ³Seek                                    ³
|55h||Reassign Mouse Threshold Values
          ³  60h   ³Device Status                           ³
|-
          ³  61h   ³Identify CD-ROM Driver                 ³
|56h||Set Pointer Shape
          ³  63h   ³Return Sector Size                     ³
|-
          ³  70h   ³Location of Drive Head                 ³
|57h||Unmark Collision Area
          ³  72h   ³Read Long                               ³
|-
          ³  78h   ³Return Volume Size                     ³
|58h||Mark Collision Area
          ³  79h   ³Get UPC                                 ³
|-
    81h   ³          ³CD-ROM Audio Control                   ³
|59h||Specify/Replace Pointer Screen Position
          ³  40h   ³Audio Channel Control                   ³
|-
          ³  50h   ³Play Audio                             ³
|5Ah||Set OS/2-Mode Pointer Draw Device Driver Address
          ³  51h   ³Stop Audio                             ³
|-
          ³  52h   ³Resume Audio                           ³
|5Bh||Reserved
          ³  60h   ³Return Audio-Channel Information       ³
|-
          ³  61h   ³Return Audio-Disc Information           ³
|5Ch||Set Current Physical Mouse Device Driver Status Flags
          ³  62h   ³Return Audio-Track Information         ³
|-
          ³  63h   ³Return Audio-Subchannel Q Information   ³
|5Dh||Notification of Mode Switch Completion
          ³  65h   ³Return Audio-Status Information         ³
|-
    81h   ³          ³Touch-Device-Dependent Driver Control   ³
|60h||Query Number of Mouse Buttons Supported
          ³  50h   ³Reserved                                ³
|-
          ³  51h   ³Reserved                                ³
|61h||Query Mouse Device Motion Sensitivity
          ³  52h   ³Set Calibration Constants               ³
|-
          ³  53h   ³Read Data                               ³
|62h||Query Current Physical Mouse Device Driver Status Flags
          ³  54h   ³Set Data Mode                           ³
|-
          ³  55h   ³Set Click-Lock Parameters               ³
|63h||Read Mouse Event Queue
          ³  56h   ³Set Touch Thresholds                   ³
|-
          ³  57h   ³Set Emulation XY Offset                 ³
|64h||Query Current Event Queue Status
          ³  58h   ³Set Data Report Rate                   ³
|-
          ³  59h   ³Set Low-Pass Filter                     ³
|65h||Query Current Mouse Event Mask
          ³  5Ah   ³Write Memory Location                   ³
|-
          ³  5Bh   ³Reserved                                ³
|66h||Query Current Mouse Scaling Factors
          ³  5Ch   ³Reserved                                ³
|-
          ³  5Dh   ³Reserved                                ³
|67h||Query Current Pointer Screen Position
          ³  5Eh   ³Reserved                                ³
|-
          ³  5Fh   ³Reserved                                ³
|68h||Query Current Pointer Shape
          ³  60h   ³Get Calibration Constants               ³
|-
          ³  61h   ³Get Data Mode                           ³
|69h||Query Mouse Threshold Values
          ³  62h   ³Get Click Lock Parameters               ³
|-
          ³  63h   ³Get Touch Thresholds                   ³
|6Ah||Query Physical Mouse Device Driver Level/Version
          ³  64h   ³Get Emulation XY Offset                 ³
|-
          ³  65h   ³Get Data Report Rate                   ³
|6Bh||Query Pointing Device ID
          ³  66h   ³Get Low Pass Filter                     ³
|-
          ³  67h   ³Read Memory Location                   ³
|rowspan=19|08h|| ||Logical Disk Control
    81h  ³          ³Touch-Device-Independent Driver Control ³
|-
          ³  50h   ³Set Coordinate System                   ³
|00h||Lock Drive
          ³  51h   ³Reserved                                ³
|-
          ³  52h   ³Set Selection Mechanism                 ³
|01h||Unlock Drive
          ³  53h   ³Set Event Mask                         ³
|-
          ³  54h   ³Set Queue Size                         ³
|02h||Redetermine Media (end format)
          ³  55h   ³Set Emulation State                     ³
|-
          ³  60h   ³Set Coordinate System                   ³
|03h||Set Logical Map
          ³  61h   ³Reserved                                ³
|-
          ³  62h   ³Get Selection Mechanism                 ³
|04h||Begin Format
          ³  63h   ³Get Event Mask                         ³
|-
          ³  64h   ³Get Queue Size                         ³
|20h||Block Removable
          ³  65h   ³Get Emulation State                     ³
|-
          ³  66h   ³Get Read Event Queue                   ³
|21h||Query Logical Map
</PRE>
|-
|22h||Reserved
|-
|40h||Removable Media Control
|-
|43h||Set Device Parameters
|-
|44h||Write/Read/Verify Track
|-
|45h||Format and Verify Track
|-
|5Dh||Diskette Control
|-
|5Eh||Reserved
|-
|5Fh||Reserved
|-
|60h||Query Media Sense
|-
|63h||Query Device Parameters
|-
|66h||Status
|-
|rowspan=7|09h|| ||Physical Disk Control
|-
|00h||Lock Physical Drive
|-
|01h||Unlock Physical Drive
|-
|44h||Physical Write Track
|-
|63h||Query Physical Device Parameters
|-
|64h||Physical Read Track
|-
|65h||Physical Verify Track
|-
|rowspan=2|0Ah|| ||Character Device Monitor Control
|-
|40h||Register Monitor
|-
|rowspan=5|0Bh|| ||General Device Control
|-
|01h||Flush Input Buffer
|-
|02h||Flush Output Buffer
|-
|41h||System Notifications for Physical Device Drivers
|-
|60h||Query Monitor Support
|-
|rowspan=7|0Ch|| ||Advanced Power Management
|-
|40h||Send Power Event
|-
|41h||Set Power Event Res
|-
|42h||Reserved
|-
|60h||Query Power Status
|-
|61h||Query Power Event
|-
|62h||Query PowerInfo
|-
|0Dh-7Fh|| ||Reserved Category Codes
|-
|rowspan=9|80h|| ||Screen Control
|-
|00h||Get Current Video Memory Bank
|-
|01h||Set Current Video Memory Bank
|-
|02-07Fh||Reserved
|-
|08h||Return Adapter Video Configuration
|-
|09h||Return Manufacturer-Specific Adapter Data
|-
|0Ah||Update Adapter Video Information
|-
|0Bh||Return Linear Address Mapped to Physical Address
|-
|0Ch-07Fh||Reserved
|-
|rowspan=19|80h|| ||OEMHLP Controls
|-
|00h||Query OEM Adaptation Information
|-
|01h||Query Machine Information
|-
|02h||Query Display Combination Code
|-
|03h||Return Video Fonts
|-
|04h||Read EISA Configuration Information-Subfunction 00
|-
|04h||Read EISA Function Information-Subfunction 01
|-
|05h||Query ROM BIOS Information
|-
|06h||Query Miscellaneous Video Information
|-
|07h||Query Video Adapter
|-
|08h||Query SVGA Information
|-
|09h||Query Memory Information
|-
|0Ah||Query, Display Mode, Query, and Set (DMQS) Information
|-
|0Bh||Access PCI BIOS
|-
|0Bh||Query PCI BIOS - Subfunction 00h
|-
|0Bh||Find PCI Device - Subfunction 01h
|-
|0Bh||Find PCI Class Code - Subfunction 02h
|-
|0Bh||Read PCI Configuration Space - Subfunction 03h
|-
|0Bh||Write PCI Configuration Space - Subfunction 04h
|-
|rowspan=7|80h|| ||TESTCFG.SYS
|-
|40h||Obtain a Copy of BIOS/Adapter Memory
|-
|41h||Issue an "IN" I/O Instruction
|-
|42h||Issue an "OUT" I/O Instruction
|-
|60h||Query Bus Architecture Function
|-
|61h||Return All POS IDs
|-
|62h||Return All EISA IDs
|-
|rowspan=3|80h|| ||Resource Manager
|-
|01h||Get Resource Manager Node Information
|-
|02h||Enumerate Resource Manager Nodes
|-
|rowspan=13|80h|| ||CD-ROM Drive and Disc Control
|-
|40h||Reset Drive
|-
|44h||Eject Disk
|-
|45h||Close Tray
|-
|46h||Lock/Unlock Door
|-
|50h||Seek
|-
|60h||Device Status
|-
|61h||Identify CD-ROM Driver
|-
|63h||Return Sector Size
|-
|70h||Location of Drive Head
|-
|72h||Read Long
|-
|78h||Return Volume Size
|-
|79h||Get UPC
|-
|rowspan=10|81h|| ||CD-ROM Audio Control
|-
|40h||Audio Channel Control
|-
|50h||Play Audio
|-
|51h||Stop Audio
|-
|52h||Resume Audio
|-
|60h||Return Audio-Channel Information
|-
|61h||Return Audio-Disc Information
|-
|62h||Return Audio-Track Information
|-
|63h||Return Audio-Subchannel Q Information
|-
|65h||Return Audio-Status Information
|-
|rowspan=25|81h|| ||Touch-Device-Dependent Driver Control
|-
|50h||Reserved
|-
|51h||Reserved
|-
|52h||Set Calibration Constants
|-
|53h||Read Data
|-
|54h||Set Data Mode
|-
|55h||Set Click-Lock Parameters
|-
|56h||Set Touch Thresholds
|-
|57h||Set Emulation XY Offset
|-
|58h||Set Data Report Rate
|-
|59h||Set Low-Pass Filter
|-
|5Ah||Write Memory Location
|-
|5Bh||Reserved
|-
|5Ch||Reserved
|-
|5Dh||Reserved
|-
|5Eh||Reserved
|-
|5Fh||Reserved
|-
|60h||Get Calibration Constants
|-
|61h||Get Data Mode
|-
|62h||Get Click Lock Parameters
|-
|63h||Get Touch Thresholds
|-
|64h||Get Emulation XY Offset
|-
|65h||Get Data Report Rate
|-
|66h||Get Low Pass Filter
|-
|67h||Read Memory Location
|-
|rowspan=14|81h|| ||Touch-Device-Independent Driver Control
|-
|50h||Set Coordinate System
|-
|51h||Reserved
|-
|52h||Set Selection Mechanism
|-
|53h||Set Event Mask
|-
|54h||Set Queue Size
|-
|55h||Set Emulation State
|-
|60h||Set Coordinate System
|-
|61h||Reserved
|-
|62h||Get Selection Mechanism
|-
|63h||Get Event Mask
|-
|64h||Get Queue Size
|-
|65h||Get Emulation State
|-
|66h||Get Read Event Queue
|}


==Category 01h ASYNC (RS232-C) Control IOCtl Commands==
==Category 01h ASYNC (RS232-C) Control IOCtl Commands==
Line 354: Line 635:


The following is a summary of the Category 01h IOCtl Commands:
The following is a summary of the Category 01h IOCtl Commands:
<PRE>
{|class="wikitable"
Function ³Description
!Function||Description
³  14h   ³Reserved                                          ³
|-
³  34h   ³Reserved                                          ³
|14h||Reserved
³  41h   ³Set Bit Rate                                     ³
|-
³  42h   ³Set Line Characteristics (stop, parity, data bits)³
|34h||Reserved
³  43h   ³Extended Set Bit Rate                             ³
|-
³  44h   ³Transmit Byte Immediate                           ³
|41h||Set Bit Rate
³  45h   ³Set Break OFF                                     ³
|-
³  46h   ³Set Modem Control Signals                         ³
|42h||Set Line Characteristics (stop, parity, data bits)
³  47h   ³Behave as if XOFF Received (stop transmit)       ³
|-
³  48h   ³Behave as if XON Received (start transmit)       ³
|43h||Extended Set Bit Rate
³  49h   ³Reserved                                          ³
|-
³  4Bh   ³Set Break ON                                     ³
|44h||Transmit Byte Immediate
³  53h   ³Set Device Control Block (DCB) Parameters         ³
|-
³  54h   ³Set Enhanced Mode Parameters                     ³
|45h||Set Break OFF
³  61h   ³Query Current Bit Rate                           ³
|-
³  62h   ³Query Line Characteristics                       ³
|46h||Set Modem Control Signals
³  63h   ³Extended Query Bit Rate                           ³
|-
³  64h   ³Query COM Status                                 ³
|47h||Behave as if XOFF Received (stop transmit)
³  65h   ³Query Transmit Data Status                       ³
|-
³  66h   ³Query Modem Control Output Signals               ³
|48h||Behave as if XON Received (start transmit)
³  67h   ³Query Current Modem Input Signals                 ³
|-
³  68h   ³Query Number of Characters in Receive Queue       ³
|49h||Reserved
³  69h   ³Query Number of Characters in Transmit Queue     ³
|-
³  6Dh   ³Query COM Error                                   ³
|4Bh||Set Break ON
³  72h   ³Query COM Event Information                       ³
|-
³  73h   ³Query Device Control Block (DCB) Parameters       ³
|53h||Set Device Control Block (DCB) Parameters
³  74h   ³Query Enhanced Mode Parameters                   ³
|-
</PRE>
|54h||Set Enhanced Mode Parameters
|-
|61h||Query Current Bit Rate
|-
|62h||Query Line Characteristics
|-
|63h||Extended Query Bit Rate
|-
|64h||Query COM Status
|-
|65h||Query Transmit Data Status
|-
|66h||Query Modem Control Output Signals
|-
|67h||Query Current Modem Input Signals
|-
|68h||Query Number of Characters in Receive Queue
|-
|69h||Query Number of Characters in Transmit Queue
|-
|6Dh||Query COM Error
|-
|72h||Query COM Event Information
|-
|73h||Query Device Control Block (DCB) Parameters
|-
|74h||Query Enhanced Mode Parameters
|}


==Category 03h Video Control IOCtl Commands==
==Category 03h Video Control IOCtl Commands==
The following is a summary of the Category 03h Video Control IOCtl Commands:
The following is a summary of the Category 03h Video Control IOCtl Commands:
<PRE>
{|class="wikitable"
Function Description
!Function||Description
³  70h   ³Allocate an LDT Selector                         ³
|-
³  71h   ³Deallocate an LDT Selector                       ³
|70h||Allocate an LDT Selector
³  72h   ³Query Pointer Draw Address                       ³
|-
³  73h   ³Initialize Call Vector Table                     ³
|71h||Deallocate an LDT Selector
³  74h   ³ABIOS Pass-Through                               ³
|-
³  75h   ³Allocate an LDT Selector with Offset             ³
|72h||Query Pointer Draw Address
³  76h   ³Allocate an LDT Selector with Background         ³
|-
³          ³Validation Options                                ³
|73h||Initialize Call Vector Table
³  7Eh   ³Allocate Video Buffer                             ³
|-
³  7Fh   ³Get Address to ROM Font                           ³
|74h||ABIOS Pass-Through
</PRE>
|-
|75h||Allocate an LDT Selector with Offset
|-
|76h||Allocate an LDT Selector with Background Validation Options
|-
|7Eh||Allocate Video Buffer
|-
|7Fh||Get Address to ROM Font
|}
 
==Category 04h Keyboard Control IOCtl Commands==
==Category 04h Keyboard Control IOCtl Commands==
The following is a summary of the Category 04h IOCtl Commands:
The following is a summary of the Category 04h IOCtl Commands:
<PRE>
{|class="wikitable"
Function Description
!Function||Description
 
|-
³  50h   ³Set Code Page                                     ³
|50h||Set Code Page
³  51h   ³Set Input Mode (Default ASCII)                   ³
|-
³  52h   ³Set Interim Character Flags                       ³
|51h||Set Input Mode (Default ASCII)
³  53h   ³Set Shift State                                   ³
|-
³  54h   ³Set Typematic Rate and Delay                     ³
|52h||Set Interim Character Flags
³  55h   ³Reserved                                          ³
|-
³  56h   ³Set Session Manager Hot Key                       ³
|53h||Set Shift State
³  57h   ³Set KCB                                           ³
|-
³  58h   ³Set Code Page Number                             ³
|54h||Set Typematic Rate and Delay
³  59h   ³Set Read/Peek Notification                       ³
|-
³  5Ah   ³Alter Keyboard LEDs                               ³
|55h||Reserved
³  5Bh   ³Reserved                                          ³
|-
³  5Ch   ³Set NLS and Custom Code Page                     ³
|56h||Set Session Manager Hot Key
³  5Dh   ³Create a New Logical Keyboard                     ³
|-
³  5Eh   ³Destroy a Logical Keyboard                       ³
|57h||Set KCB
³  71h   ³Query Input Mode                                 ³
|-
³  72h   ³Query Interim Character Flags                     ³
|58h||Set Code Page Number
³  73h   ³Query Shift State                                 ³
|-
³  74h   ³Read Character Data Records                       ³
|59h||Set Read/Peek Notification
³  75h   ³Peek Character Data Record                       ³
|-
³  76h   ³Query Session Manager Hot Key                     ³
|5Ah||Alter Keyboard LEDs
³  77h   ³Query Keyboard Type                               ³
|-
³  78h   ³Query Code Page Number                           ³
|5Bh||Reserved
³  79h   ³Translate Scan Code to ASCII                     ³
|-
³  7Ah   ³Query Keyboard Hardware ID                       ³
|5Ch||Set NLS and Custom Code Page
³  7Bh   ³Query Keyboard Code Page Support Information     ³
|-
</PRE>
|5Dh||Create a New Logical Keyboard
|-
|5Eh||Destroy a Logical Keyboard
|-
|71h||Query Input Mode
|-
|72h||Query Interim Character Flags
|-
|73h||Query Shift State
|-
|74h||Read Character Data Records
|-
|75h||Peek Character Data Record
|-
|76h||Query Session Manager Hot Key
|-
|77h||Query Keyboard Type
|-
|78h||Query Code Page Number
|-
|79h||Translate Scan Code to ASCII
|-
|7Ah||Query Keyboard Hardware ID
|-
|7Bh||Query Keyboard Code Page Support Information
|}


==Category 05h Parallel Port Control IOCtl Commands==
==Category 05h Parallel Port Control IOCtl Commands==
The following is a summary of Category 05h IOCtl Commands:
The following is a summary of Category 05h IOCtl Commands:
<PRE>
{|class="wikitable"
³Function  ³Description                                      ³
!Function||Description
³  42h   ³Set Frame Control (CPL, LPI)                     ³
|-
³  43h   ³Reserved                                          ³
|42h||Set Frame Control (CPL, LPI)
³  44h   ³Set Infinite Retry                               ³
|-
³  45h   ³Reserved                                          ³
|43h||Reserved
³  46h   ³Initialize Parallel Port                         ³
|-
³  47h   ³Reserved                                          ³
|44h||Set Infinite Retry
³  48h   ³Activate Font                                     ³
|-
³  49h   ³Reserved                                          ³
|45h||Reserved
³  4Bh   ³Reserved                                          ³
|-
³  4Ch   ³Reserved                                          ³
|46h||Initialize Parallel Port
³  4Dh   ³Set Print-Job Title                               ³
|-
³  4Eh   ³Set Parallel Port Write Timeout Value             ³
|47h||Reserved
³  4Fh   ³Reserved                                          ³
|-
³  50h   ³Reserved                                          ³
|48h||Activate Font
³  51h   ³Reserved                                          ³
|-
³  52h   ³Set Parallel Port Communication Mode             ³
|49h||Reserved
³  53h   ³Set Parallel Port Data Transfer Mode             ³
|-
³  62h   ³Query Frame Control                               ³
|4Bh||Reserved
³  63h   ³Reserved                                          ³
|-
³  64h   ³Query Infinite Retry                             ³
|4Ch||Reserved
³  65h   ³Reserved                                          ³
|-
³  66h   ³Query Parallel Port Status                       ³
|4Dh||Set Print-Job Title
³  67h   ³Reserved                                          ³
|-
³  68h   ³Reserved                                          ³
|4Eh||Set Parallel Port Write Timeout Value
³  69h   ³Query Active Font                                 ³
|-
³  6Ah   ³Verify Font                                       ³
|4Fh||Reserved
³  6Bh   ³Reserved                                          ³
|-
³  6Ch   ³Reserved                                          ³
|50h||Reserved
³  6Dh   ³Reserved                                          ³
|-
³  6Eh   ³Query Parallel Port Write Timeout Value           ³
|51h||Reserved
³  6Fh   ³Reserved                                          ³
|-
³  70h   ³Reserved                                          ³
|52h||Set Parallel Port Communication Mode
³  71h   ³Reserved                                          ³
|-
³  72h   ³Query Parallel Port Communication Mode           ³
|53h||Set Parallel Port Data Transfer Mode
³  73h   ³Query Parallel Port Data Transfer Mode           ³
|-
³  74h   ³Query Parallel Port Device ID                     ³
|62h||Query Frame Control
</PRE>
|-
|63h||Reserved
|-
|64h||Query Infinite Retry
|-
|65h||Reserved
|-
|66h||Query Parallel Port Status
|-
|67h||Reserved
|-
|68h||Reserved
|-
|69h||Query Active Font
|-
|6Ah||Verify Font
|-
|6Bh||Reserved
|-
|6Ch||Reserved
|-
|6Dh||Reserved
|-
|6Eh||Query Parallel Port Write Timeout Value
|-
|6Fh||Reserved
|-
|70h||Reserved
|-
|71h||Reserved
|-
|72h||Query Parallel Port Communication Mode
|-
|73h||Query Parallel Port Data Transfer Mode
|-
|74h||Query Parallel Port Device ID
|}


==Category 07h Mouse Control IOCtl Commands==
==Category 07h Mouse Control IOCtl Commands==
The following is a summary of Category 07h IOCtl Commands:
The following is a summary of Category 07h IOCtl Commands:
<PRE>
{| class="wikitable"
Function ³Description
|+ 07h Mouse Control IOCtl Commands
  50h   ³Reserved
|-
  51h   ³Notification of Display Mode Change               ³
! Function
  52h   ³Reserved                                          ³
! Description
  53h   ³Reassign Current Mouse Scaling Factors           ³
|-
  54h   ³Assign New Mouse Event Mask                       ³
| 50h
  55h   ³Reassign Mouse Threshold Values                   ³
| Reserved
  56h   ³Set Pointer Shape                                 ³
|-
  57h   ³Unmark Collision Area                             ³
| 51h
  58h   ³Mark Collision Area                               ³
| Notification of Display Mode Change
  59h   ³Specify/Replace Pointer Screen Position           ³
|-
  5Ah   ³Set OS/2 Mode Pointer Draw Device Driver Address ³
| 52h
  5Bh   ³Reserved                                          ³
| Reserved
  5Ch   ³Set Current Physical Mouse Device Driver Status Flags                                             ³
|-
  5Dh   ³Notification of Mode Switch Completion           ³
| 53h
  60h   ³Query Number of Mouse Buttons Supported           ³
| Reassign Current Mouse Scaling Factors
  61h   ³Query Mouse Device Motion Sensitivity             ³
|-
  62h   ³Query Current Physical Mouse Device Driver Status ³
| 54h
³          ³Flags                                            ³
| Assign New Mouse Event Mask
  63h   ³Read Mouse Event Queue                           ³
|-
  64h   ³Query Current Event Queue Status                 ³
| 55h
  65h   ³Query Current Mouse Event Mask                   ³
| Reassign Mouse Threshold Values
  66h   ³Query Current Mouse Scaling Factors               ³
|-
  67h   ³Query Current Pointer Screen Position             ³
| 56h
  68h   ³Query Current Pointer Shape                       ³
| Set Pointer Shape
  69h   ³Query Mouse Threshold Values                     ³
|-
  6Ah   ³Query Physical Mouse Device Driver Level/Version ³
| 57h
³          ³Number                                            ³
| Unmark Collision Area
  6Bh   ³Query Pointing Device ID
|-
</PRE>
| 58h
| Mark Collision Area
|-
| 59h
| Specify/Replace Pointer Screen Position
|-
| 5Ah
| Set OS/2 Mode Pointer Draw Device Driver Address
|-
| 5Bh
| Reserved
|-
| 5Ch
| Set Current Physical Mouse Device Driver Status Flags
|-
| 5Dh
| Notification of Mode Switch Completion
|-
| 60h
| Query Number of Mouse Buttons Supported
|-
| 61h
| Query Mouse Device Motion Sensitivity
|-
| 62h
| Query Current Physical Mouse Device Driver Status Flags
|-
| 63h
| Read Mouse Event Queue
|-
| 64h
| Query Current Event Queue Status
|-
| 65h
| Query Current Mouse Event Mask
|-
| 66h
| Query Current Mouse Scaling Factors
|-
| 67h
| Query Current Pointer Screen Position
|-
| 68h
| Query Current Pointer Shape
|-
| 69h
| Query Mouse Threshold Values
|-
| 6Ah
| Query Physical Mouse Device Driver Level/Version Number
|-
| 6Bh
| Query Pointing Device ID
|}
 
==Category 08h Logical Disk Control IOCtl Commands==
==Category 08h Logical Disk Control IOCtl Commands==
The following is a summary of Category 08h IOCtl Commands:
The following is a summary of Category 08h IOCtl Commands:
<PRE>
{|class="wikitable"
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
!Function||Description
³Function            ³Description                            ³
|-
  00h             ³Lock Drive                             ³
|00h||Lock Drive
  01h             ³Unlock Drive                           ³
|-
  02h             ³Redetermine Media                       ³
|01h||Unlock Drive
  03h             ³Set Logical Map                         ³
|-
  04h             ³Begin Format                           ³
|02h||Redetermine Media
  20h             ³Block Removable                         ³
|-
  21h             ³Query Logical Map                       ³
|03h||Set Logical Map
  22h             ³Reserved                                ³
|-
  40h             ³Removable Media Control                 ³
|04h||Begin Format
  43h             ³Set Device Parameters                   ³
|-
  44h             ³Write Logical Track                     ³
|20h||Block Removable
  45h             ³Format and Verify Track                 ³
|-
  5Dh             ³Diskette Control                       ³
|21h||Query Logical Map
  5Eh             ³Reserved                                ³
|-
  5Fh             ³Reserved                                ³
|22h||Reserved
  60h             ³Query Media Sense                       ³
|-
  63h             ³Query Device Parameters                 ³
|40h||Removable Media Control
  64h             ³Read Logical Track                     ³
|-
  65h             ³Verify Logical Track                   ³
|43h||Set Device Parameters
  66h             ³Status
|-
</PRE>
|44h||Write Logical Track
|-
|45h||Format and Verify Track
|-
|5Dh||Diskette Control
|-
|5Eh||Reserved
|-
|5Fh||Reserved
|-
|60h||Query Media Sense
|-
|63h||Query Device Parameters
|-
|64h||Read Logical Track
|-
|65h||Verify Logical Track
|-
|66h||Status
|}
 
==Category 09h Physical Disk Control IOCtl Commands==
==Category 09h Physical Disk Control IOCtl Commands==
Category 09h is used to access physical partitionable hard disks. The handle used for Category 09h command is returned by the DosPhysicalDisk (Function 2) API function. (See the OS/2 Control Program Programming Reference for more information). This handle is used to tell the system which physical disk is accessed by the IOCtl command.
Category 09h is used to access physical partitionable hard disks. The handle used for Category 09h command is returned by the DosPhysicalDisk (Function 2) API function. (See the OS/2 Control Program Programming Reference for more information). This handle is used to tell the system which physical disk is accessed by the IOCtl command.


The Physical Disk Control commands relate to the entire partitionable hard disk. Direct track and sector I/O start at the beginning of the physical drive. PDSK_GETPHYSDEVICEPARAMS, describes the entire physical device.
The Physical Disk Control commands relate to the entire partitionable hard disk. Direct track and sector I/O start at the beginning of the physical drive. [[PDSK_GETPHYSDEVICEPARAMS]], describes the entire physical device.


The following is a summary of Category 09h IOCtl Commands:
The following is a summary of Category 09h IOCtl Commands:
<PRE>
{|class="wikitable"
Function       Description
!Function||Description
  00h         Lock Physical Drive
|-
  01h         Unlock Physical Drive
|00h||Lock Physical Drive
  44h         Write Physical Track
|-
  63h         Query Physical Device Parameters
|01h||Unlock Physical Drive
  64h         Read Physical Track
|-
  65h         Verify Physical Track
|44h||Write Physical Track
</PRE>
|-
|63h||Query Physical Device Parameters
|-
|64h||Read Physical Track
|-
|65h||Verify Physical Track
|}


==Category 0Ah Character Device Monitor IOCtl Command==
==Category 0Ah Character Device Monitor IOCtl Command==
Line 559: Line 1,017:
==Category 0Bh General Device Control IOCtl Commands==
==Category 0Bh General Device Control IOCtl Commands==
The following is a summary of Category 0Bh IOCtl Commands:
The following is a summary of Category 0Bh IOCtl Commands:
<PRE>
{|class="wikitable"
Function Description
!Function||Description
  01h   Flush Input Buffer
|-
  02h   Flush Output Buffer
|01h||Flush Input Buffer
  41h   System Notifications for Physical Device Drivers
|-
  60h   Query Monitor Support
|02h||Flush Output Buffer
</PRE>
|-
|41h||System Notifications for Physical Device Drivers
|-
|60h||Query Monitor Support
|}


==Category 0Ch Advanced Power Management==
==Category 0Ch Advanced Power Management==
<PRE>
{|class="wikitable"
Function Description
!Function||Description
40h       Send Power Event
|-
41h       Set Power Event Resource
|40h||Send Power Event
42h - 44h Reserved
|-
45h       OEM APM Function
|41h||Set Power Event Resource
60h       Query Power Status
|-
61h       Query Power Event
|42h - 44h||Reserved
62h       Query Power Information
|-
63h       Query Power State
|45h||OEM APM Function
</PRE>
|-
|60h||Query Power Status
|-
|61h||Query Power Event
|-
|62h||Query Power Information
|-
|63h||Query Power State
|}


==Category 80h Screen Control IOCtl Commands==
==Category 80h Screen Control IOCtl Commands==
Line 584: Line 1,054:


The function codes within the SCREENDD_CATEGORY are:
The function codes within the SCREENDD_CATEGORY are:
<PRE>
{|class="wikitable"
Function Description
!Function||Description
00h       Get Current Video Memory Bank
|-
01h       Set Current Video Memory Bank
|00h||Get Current Video Memory Bank
02h-07h   Reserved
|-
08h       Return Adapter Video Configuration
|01h||Set Current Video Memory Bank
09h       Return Manufacturer-Specific Adapter Data
|-
0Ah       Update Adapter Video Memory Information
|02h-07h||Reserved
0Bh       Return Linear Address Mapped to Physical Address
|-
0Ch-7Fh   Reserved
|08h||Return Adapter Video Configuration
</PRE>
|-
|09h||Return Manufacturer-Specific Adapter Data
|-
|0Ah||Update Adapter Video Memory Information
|-
|0Bh||Return Linear Address Mapped to Physical Address
|-
|0Ch-7Fh||Reserved
|}
An example of the DosDevIOCtl calling convention for the Screen IOCtls follows:
An example of the DosDevIOCtl calling convention for the Screen IOCtls follows:
<PRE>
<PRE>
Line 724: Line 1,202:
======OEMHLP IOCtls Summary======
======OEMHLP IOCtls Summary======
The following is a summary of Category 80h OEMHLP IOCtl Commands:
The following is a summary of Category 80h OEMHLP IOCtl Commands:
<PRE>
{|class="wikitable"
Function Description
!Function||Description
00h       Query OEM Adaptation Information
|-
01h       Query Machine Information
|00h||Query OEM Adaptation Information
02h       Query Display Combination Code
|-
03h       Return Video Fonts
|01h||Query Machine Information
04h       Read EISA Slot Configuration Information     - Subfunction 00
|-
04h       Read EISA Function Configuration Information - Subfunction 01
|02h||Query Display Combination Code
05h       Query ROM BIOS Information
|-
06h       Query Miscellaneous Video Information
|03h||Return Video Fonts
07h       Query Video Adapter
|-
08h       Query SVGA Information
|04h||Read EISA Slot Configuration Information - Subfunction 00
09h       Query Memory Information
|-
0Ah       Query Display Mode, Query and Set (DMQS) Information
|04h||Read EISA Function Configuration Information - Subfunction 01
0Bh       Access PCI BIOS Information
|-
0Bh       Query PCI BIOS Information - Subfunction 00h
|05h||Query ROM BIOS Information
0Bh       Find PCI Device - Subfunction 01h
|-
0Bh       Find PCI Class Code - Subfunction 02h
|06h||Query Miscellaneous Video Information
0Bh       Read PCI Configuration Space - Subfunction 03h
|-
0Bh       Write PCI Configuration Space - Subfunction 04h
|07h||Query Video Adapter
</PRE>
|-
|08h||Query SVGA Information
|-
|09h||Query Memory Information
|-
|0Ah||Query Display Mode, Query and Set (DMQS) Information
|-
|0Bh||Access PCI BIOS Information
|-
|0Bh||Query PCI BIOS Information - Subfunction 00h
|-
|0Bh||Find PCI Device - Subfunction 01h
|-
|0Bh||Find PCI Class Code - Subfunction 02h
|-
|0Bh||Read PCI Configuration Space - Subfunction 03h
|-
|0Bh||Write PCI Configuration Space - Subfunction 04h
|}


====Category 80h Adapter Presence-Check Services (TESTCFG.SYS)====
====Category 80h Adapter Presence-Check Services (TESTCFG.SYS)====
The TESTCFG device driver provides services for automatic detection of Original Equipment Manufacturer (OEM) hardware interfaces. Functions provided by this driver are accessed entirely by opening the device name TESTCFG$ and using the following Category 80h IOCtls.
The TESTCFG device driver provides services for automatic detection of Original Equipment Manufacturer (OEM) hardware interfaces. Functions provided by this driver are accessed entirely by opening the device name TESTCFG$ and using the following Category 80h IOCtls.
<PRE>
{|class="wikitable"
Function Description
!Function||Description
40H       Get Copy of BIOS/Adapter Memory
|-
41H       Issue an "IN" I/O Instruction
|40H||Get Copy of BIOS/Adapter Memory
42H       Issue an "OUT" I/O Instruction
|-
60H       Get Bus Architecture Function
|41H||Issue an "IN" I/O Instruction
61H       Return All POS IDs
|-
62H       Return All EISA IDs
|42H||Issue an "OUT" I/O Instruction
</PRE>
|-
|60H||Get Bus Architecture Function
|-
|61H||Return All POS IDs
|-
|62H||Return All EISA IDs
|}


====Category 80h Resource Manager IOCtl Commands====
====Category 80h Resource Manager IOCtl Commands====
Line 768: Line 1,270:


3.- A copy of each Resource Manager node can be obtained by supplying the node handle returned in Step 1.
3.- A copy of each Resource Manager node can be obtained by supplying the node handle returned in Step 1.
<PRE>
{|class="wikitable"
  Function Description
!Function||Description
  01h       Get Resource Manager Node Data
|-
  02h       Enumerate Resource Manager Nodes
|01h||Get Resource Manager Node Data
</PRE>
|-
|02h||Enumerate Resource Manager Nodes
|}


====Category 80h CD-ROM Drive and Disc IOCtl Commands====
====Category 80h CD-ROM Drive and Disc IOCtl Commands====
Line 778: Line 1,282:


The CD-ROM device driver returns error values in the range of hex FF00 through FF14. DOS DevIOCtl return codes are described in the OS/2 Programming Reference manuals.
The CD-ROM device driver returns error values in the range of hex FF00 through FF14. DOS DevIOCtl return codes are described in the OS/2 Programming Reference manuals.
<PRE>
{|class="wikitable"
Function Description
!Function||Description
40h       Reset Drive
|-
44h       Eject Disc
|40h||Reset Drive
45h       Close Tray
|-
46h       Lock/Unlock Door
|44h||Eject Disc
50h       Seek
|-
60h       Return Device Status
|45h||Close Tray
61h       Identify CD-ROM Driver
|-
63h       Return Sector Size
|46h||Lock/Unlock Door
70h       Report Location of Drive Head
|-
72h       Read Long
|50h||Seek
78h       Return Volume Size
|-
79h       Get UPC
|60h||Return Device Status
</PRE>
|-
|61h||Identify CD-ROM Driver
|-
|63h||Return Sector Size
|-
|70h||Report Location of Drive Head
|-
|72h||Read Long
|-
|78h||Return Volume Size
|-
|79h||Get UPC
|}


====Category 81h CD-ROM Audio IOCtl Commands====
====Category 81h CD-ROM Audio IOCtl Commands====
Line 798: Line 1,314:


The CD-ROM device driver returns error values in the range of hex FF00 through FF14. DOSDevIOCtl return codes are described in the OS/2 Programming Reference manuals.
The CD-ROM device driver returns error values in the range of hex FF00 through FF14. DOSDevIOCtl return codes are described in the OS/2 Programming Reference manuals.
<PRE>
{|class="wikitable"
Function Description
!Function||Description
40h       Set Audio Channel Control
|-
50h       Play Audio
|40h||Set Audio Channel Control
51h       Stop Audio
|-
52h       Resume Audio
|50h||Play Audio
60h       Return Audio-Channel Information
|-
61h       Return Audio-Disk Information
|51h||Stop Audio
62h       Return Audio-Track Information
|-
63h       Return Audio-Subchannel Q Information
|52h||Resume Audio
65h       Return Audio-Status Information
|-
</PRE>
|60h||Return Audio-Channel Information
|-
|61h||Return Audio-Disk Information
|-
|62h||Return Audio-Track Information
|-
|63h||Return Audio-Subchannel Q Information
|-
|65h||Return Audio-Status Information
|}


====Category 81h Touch Device-Dependent Driver====
====Category 81h Touch Device-Dependent Driver====
Line 816: Line 1,341:
======Device-Dependent Device Driver Command Summary======
======Device-Dependent Device Driver Command Summary======
The following table describes the Category 81h Touch Device-Dependent Driver IOCtl commands:
The following table describes the Category 81h Touch Device-Dependent Driver IOCtl commands:
<PRE>
{|class="wikitable"
Function Description
!Function||Description
50h       Reserved.
|-
51h       Reserved.
|50h||rowspan=2|Reserved.
52h       Set Calibration Constants
|-
53h       Read Data
|51h
54h       Set Data Mode
|-
55h       Set Click-Lock Parameters
|52h||Set Calibration Constants
56h       Set Touch Thresholds
|-
57h       Set Emulation XY Offset
|53h||Read Data
58h       Set Data Report Rate
|-
59h       Set Low Pass Filter
|54h||Set Data Mode
5Ah       Write Memory Location
|-
5Bh       Reserved.
|55h||Set Click-Lock Parameters
5Ch       Reserved.
|-
5Dh       Reserved.
|56h||Set Touch Thresholds
5Eh       Reserved.
|-
5Fh       Reserved.
|57h||Set Emulation XY Offset
60h       Get Calibration Constants
|-
61h       Get Data Mode
|58h||Set Data Report Rate
62h       Get Click-Lock Parameters
|-
63h       Get Touch Thresholds
|59h||Set Low Pass Filter
64h       Get Emulation XY Offset
|-
65h       Get Data Report Rate
|5Ah||Write Memory Location
66h       Get Low Pass Filter
|-
67h       Read Memory Location
|5Bh||rowspan=5|Reserved.
</PRE>
|-
|5Ch
|-
|5Dh
|-
|5Eh
|-
|5Fh
|-
|60h||Get Calibration Constants
|-
|61h||Get Data Mode
|-
|62h||Get Click-Lock Parameters
|-
|63h||Get Touch Thresholds
|-
|64h||Get Emulation XY Offset
|-
|65h||Get Data Report Rate
|-
|66h||Get Low Pass Filter
|-
|67h||Read Memory Location
|}


====Category 81h Touch Device-Independent Driver====
====Category 81h Touch Device-Independent Driver====
Line 848: Line 1,397:


The following lists and describes the Category 81h Touch Device-Independent Driver:
The following lists and describes the Category 81h Touch Device-Independent Driver:
<PRE>
{|class="wikitable"
Function Description
!Function||Description
50h       Set Coordinate System
|-
51h       Reserved
|50h||Set Coordinate System
52h       Set Selection Mechanism
|-
53h       Set Event Mask
|51h||Reserved
54h       Set Queue Size
|-
55h       Set Emulation State
|52h||Set Selection Mechanism
60h       Get Coordinate System
|-
61h       Reserved
|53h||Set Event Mask
62h       Get Selection Mechanism
|-
63h       Get Event Mask
|54h||Set Queue Size
64h       Get Queue Size
|-
65h       Get Emulation State
|55h||Set Emulation State
66h       Get Read Event Queue
|-
</PRE>
|60h||Get Coordinate System
 
|-
[[Category:PDDREF]]
|61h||Reserved
|-
|62h||Get Selection Mechanism
|-
|63h||Get Event Mask
|-
|64h||Get Queue Size
|-
|65h||Get Emulation State
|-
|66h||Get Read Event Queue
|}

Latest revision as of 03:42, 22 May 2025

Physical Device Driver Reference
  1. Introduction
  2. Physical Device Driver Overview
  3. Physical Device Driver Architecture and Structure
  4. OS/2 Physical Device Driver Operations
  5. OS/2 Physical Device Driver Design Issues
  6. Character Device Monitors
  7. Installation of External Loadable Device Drivers
  8. Physical Device Driver Strategy Commands
  9. Device Helper (DevHlp) Services
  10. Resource Management
  11. Linking Resource Manager Services
  12. Generic IOCtl Commands
Appendixes
OS/2 Version Compatibility Considerations
Running OS/2 Version 1.3 16-Bit PDDs on OS/2
Using Advanced Bios
Notices
Glossary

OS/2 device drivers are used to access the I/O hardware. The IOCtl functions provide a method for an application, or subsystem, to send device-specific control commands to a physical device driver. These IOCtls are subfunctions that are issued through the DosDevIOCtl API function request. The DosDevIOCtl function request can be used only by OS/2 applications; the INT 21h IOCtl request can be used only by DOS applications.

The category and function fields are as follows. Each code is contained in a byte:

Category Code
0xxx xxxx OS/2-defined
1xxx xxxx User-defined
_xxx xxxx Code.
Function Code
Return error, if unsupported 0xxx xxxx
Ignore, if unsupported 1xxx xxxx
Intercepted by the OS/2 operating system x0xx xxxx
Passed to driver x1xx xxxx
Sends data and commands to device xx0x xxxx
Queries data and information from device xx1x xxxx
Subfunction ___x xxxx

Notice that the send/query data bit is intended only to standardize the function set; it plays no critical role. Some functions can contain both command and query elements. Such commands are defined as sends data.

Generic IOCtl Example

The DosDevIOCtl function sends the request to the physical device driver request packet. The physical device driver receives the request packet, and looks for the Command Code (Command 16 is the generic IOCtl command) to identify the request. Notice that each device driver can define the structure of the Data Packet and the Parameter Packet, but all device drivers use the same request header.

The 16-bit calling sequence for DosDevIOCtl is shown below:

EXTRN   DosDevIOCtl:Far

PUSH@   OTHER  Data        ; Data Packet address
PUSH@   OTHER  ParmList    ; Parameter Packet address
PUSH    WORD   Function    ; Function code
PUSH    WORD   Category    ; Category code
PUSH    WORD   DevHandle   ; User's device driver file handle

CALL    DosDevIOCtl

The 32-bit calling sequence for DosDevIOCtl is shown below:

PUSH@   DWORD  DataLengthInOut   ; Data Length Address
PUSH    DWORD  DataLengthMAX     ; Max size of Data Packet
PUSH@   OTHER  Data              ; Data Packet Address
PUSH@   DWORD  ParmLengthInOut   ; Parm Length Address
PUSH    DWORD  ParmLengthMax     ; Max size of Parm List
PUSH@   OTHER  ParmList          ; Parameter Packet Address
PUSH    DWORD  Function          ; Function Code
PUSH    DWORD  Category          ; Category Code
PUSH    DWORD  DevHandle         ; User's device driver file handle

Call DOSDevIOCtl

DosDevIOCtl2 performs the same function as DosDevIOCtl, and also provides Length fields for the Data and Parameter List buffers. These Length fields should be passed to the Device Helper service VerifyAccess when the physical device driver is determining whether it has access to the application's Data and Parameter List buffers. The Length fields also tell physical network device drivers the amount of data residing in these buffers for the transfer to other network nodes.

The 16-bit calling sequence for DosDevIOCtl2 is shown below:

EXTRN   DosDevIOCtl2:Far

PUSH@   OTHER  Data        ; Data Packet address
PUSH    WORD   DataLength  ; Data Packet length
PUSH@   OTHER  ParmList    ; Parameter Packet address
PUSH    WORD   ParmLength  ; Parameter Packet length
PUSH    WORD   Function    ; Function code
PUSH    WORD   Category    ; Category code
PUSH    WORD   DevHandle   ; User's device driver file handle

CALL    DosDevIOCtl2

Generic IOCtl Function Table

The list of categories and functions for the generic IOCtl requests are as follows:

Category Function Description
01h Serial Device Control
14h Reserved
34h Reserved
41h Set Bit Rate
42h Set Line Characteristics (stop, parity, data bits)
43h Extended Set Bit Rate
44h Transmit Byte Immediate
45h Set Break OFF
46h Set Modem Control Signals
47h Behave As If XOFF Received (stop transmit)
48h Behave As If XON Received (start transmit)
49h Reserved
4Bh Set Break ON
53h Set Device Control Block (DCB) Parameters
54h Set Enhanced Mode Parameters
61h Query Current Bit Rate
62h Query Line Characteristics
63h Extended Query Bit Rate
64h Query COM Status
65h Query Transmit Data Status
66h Query Modem Control Output Signals
67h Query Current Modem Input Signals
68h Query Number of Characters in Receive Queue
69h Query Number of Characters in Transmit Queue
6Dh Query COM Error
72h Query COM Event Information
73h Query Device Control Block (DCB) Parameters
74h Query Enhanced Mode Parameters
02h Reserved
03h Video Control
70h Allocate an LDT Selector
71h Deallocate an LDT Selector
72h Query Pointer Draw Address
73h Initialize Call Vector Table
74h ABIOS Pass-Through
75h Allocate an LDT Selector with Offset
76h Allocate an LDT Selector with Background Validation Options
7Eh Allocate Video Buffer
7Fh Get Address to ROM Font
04h Keyboard Control
50h Set Code Page
51h Set Input Mode (Default ASCII)
52h Set Interim Character Flags
53h Set Shift State
54h Set Typematic Rate and Delay
55h Reserved
56h Set Session Manager Hot Key
57h Set KCB
58h Set Code Page Number
59h Set Read/Peek Notification
5Ah Alter Keyboard LEDs
5Bh Reserved
5Ch Set NLS and Custom Code Page
5Dh Create New Logical Keyboard
5Eh Destroy Logical Keyboard
71h Query Input Mode
72h Query Interim Character Flags
73h Query Shift State
74h Read Character Data Records
75h Peek Character Data Record
76h Query Session Manager Hot Key
77h Query Keyboard Type
78h Query Code Page Number
79h Translate Scan Code to ASCII
7Ah Query Keyboard Hardware ID
7Bh Query Keyboard Code Page Support Information
05h Parallel Port Control
42h Set Frame Control (CPL, LPI)
43h Reserved
44h Set Infinite Retry
45h Reserved
46h Initialize Parallel Port
47h Reserved
48h Activate Font
49h Reserved
4Bh Reserved
4Ch Reserved
4Dh Set Print-Job Title
4Eh Set Parallel Port Write Time-Out Value
4Fh Reserved
50h Reserved
51h Reserved
52h Set Parallel Port Communication Mode
53h Set Parallel Port Data Transfer Mode
62h Query Frame Control
63h Reserved
64h Query Infinite Retry
65h Reserved
66h Query Parallel Port Status
67h Reserved
68h Reserved
69h Query Active Font
6Ah Verify Font
6Bh Reserved
6Ch Reserved
6Dh Reserved
6Eh Query Parallel Port Write Time-Out Value
6Fh Reserved
70h Reserved
71h Reserved
72h Query Parallel Port Communication Mode
73h Query Parallel Port Data Transfer Mode
74h Query Parallel Port Device ID
06h Light Pen Control
07h Mouse Control
50h Reserved
51h Notification of Display Mode Change
52h Reserved
53h Reassign Current Mouse Scaling Factors
54h Assign New Mouse Event Mask
55h Reassign Mouse Threshold Values
56h Set Pointer Shape
57h Unmark Collision Area
58h Mark Collision Area
59h Specify/Replace Pointer Screen Position
5Ah Set OS/2-Mode Pointer Draw Device Driver Address
5Bh Reserved
5Ch Set Current Physical Mouse Device Driver Status Flags
5Dh Notification of Mode Switch Completion
60h Query Number of Mouse Buttons Supported
61h Query Mouse Device Motion Sensitivity
62h Query Current Physical Mouse Device Driver Status Flags
63h Read Mouse Event Queue
64h Query Current Event Queue Status
65h Query Current Mouse Event Mask
66h Query Current Mouse Scaling Factors
67h Query Current Pointer Screen Position
68h Query Current Pointer Shape
69h Query Mouse Threshold Values
6Ah Query Physical Mouse Device Driver Level/Version
6Bh Query Pointing Device ID
08h Logical Disk Control
00h Lock Drive
01h Unlock Drive
02h Redetermine Media (end format)
03h Set Logical Map
04h Begin Format
20h Block Removable
21h Query Logical Map
22h Reserved
40h Removable Media Control
43h Set Device Parameters
44h Write/Read/Verify Track
45h Format and Verify Track
5Dh Diskette Control
5Eh Reserved
5Fh Reserved
60h Query Media Sense
63h Query Device Parameters
66h Status
09h Physical Disk Control
00h Lock Physical Drive
01h Unlock Physical Drive
44h Physical Write Track
63h Query Physical Device Parameters
64h Physical Read Track
65h Physical Verify Track
0Ah Character Device Monitor Control
40h Register Monitor
0Bh General Device Control
01h Flush Input Buffer
02h Flush Output Buffer
41h System Notifications for Physical Device Drivers
60h Query Monitor Support
0Ch Advanced Power Management
40h Send Power Event
41h Set Power Event Res
42h Reserved
60h Query Power Status
61h Query Power Event
62h Query PowerInfo
0Dh-7Fh Reserved Category Codes
80h Screen Control
00h Get Current Video Memory Bank
01h Set Current Video Memory Bank
02-07Fh Reserved
08h Return Adapter Video Configuration
09h Return Manufacturer-Specific Adapter Data
0Ah Update Adapter Video Information
0Bh Return Linear Address Mapped to Physical Address
0Ch-07Fh Reserved
80h OEMHLP Controls
00h Query OEM Adaptation Information
01h Query Machine Information
02h Query Display Combination Code
03h Return Video Fonts
04h Read EISA Configuration Information-Subfunction 00
04h Read EISA Function Information-Subfunction 01
05h Query ROM BIOS Information
06h Query Miscellaneous Video Information
07h Query Video Adapter
08h Query SVGA Information
09h Query Memory Information
0Ah Query, Display Mode, Query, and Set (DMQS) Information
0Bh Access PCI BIOS
0Bh Query PCI BIOS - Subfunction 00h
0Bh Find PCI Device - Subfunction 01h
0Bh Find PCI Class Code - Subfunction 02h
0Bh Read PCI Configuration Space - Subfunction 03h
0Bh Write PCI Configuration Space - Subfunction 04h
80h TESTCFG.SYS
40h Obtain a Copy of BIOS/Adapter Memory
41h Issue an "IN" I/O Instruction
42h Issue an "OUT" I/O Instruction
60h Query Bus Architecture Function
61h Return All POS IDs
62h Return All EISA IDs
80h Resource Manager
01h Get Resource Manager Node Information
02h Enumerate Resource Manager Nodes
80h CD-ROM Drive and Disc Control
40h Reset Drive
44h Eject Disk
45h Close Tray
46h Lock/Unlock Door
50h Seek
60h Device Status
61h Identify CD-ROM Driver
63h Return Sector Size
70h Location of Drive Head
72h Read Long
78h Return Volume Size
79h Get UPC
81h CD-ROM Audio Control
40h Audio Channel Control
50h Play Audio
51h Stop Audio
52h Resume Audio
60h Return Audio-Channel Information
61h Return Audio-Disc Information
62h Return Audio-Track Information
63h Return Audio-Subchannel Q Information
65h Return Audio-Status Information
81h Touch-Device-Dependent Driver Control
50h Reserved
51h Reserved
52h Set Calibration Constants
53h Read Data
54h Set Data Mode
55h Set Click-Lock Parameters
56h Set Touch Thresholds
57h Set Emulation XY Offset
58h Set Data Report Rate
59h Set Low-Pass Filter
5Ah Write Memory Location
5Bh Reserved
5Ch Reserved
5Dh Reserved
5Eh Reserved
5Fh Reserved
60h Get Calibration Constants
61h Get Data Mode
62h Get Click Lock Parameters
63h Get Touch Thresholds
64h Get Emulation XY Offset
65h Get Data Report Rate
66h Get Low Pass Filter
67h Read Memory Location
81h Touch-Device-Independent Driver Control
50h Set Coordinate System
51h Reserved
52h Set Selection Mechanism
53h Set Event Mask
54h Set Queue Size
55h Set Emulation State
60h Set Coordinate System
61h Reserved
62h Get Selection Mechanism
63h Get Event Mask
64h Get Queue Size
65h Get Emulation State
66h Get Read Event Queue

Category 01h ASYNC (RS232-C) Control IOCtl Commands

Whenever an IOCtl command calls for a NULL pointer, it is the responsibility of the application to set one up for the appropriate Parameter or Data Packet pointer before calling the physical device driver. IOCtls can be interpreted differently by future releases if the pointer is not a NULL pointer. If a NULL pointer is called for and it is not received by the device driver, it is considered an invalid Parameter or Data Packet value.

The physical device driver services each communications port (COM1, COM2, and so forth) independently. IOCtls issued to the physical device driver for a given port have no effect on any other communications ports that the physical device driver is servicing. The application cannot assume a given timing relationship between when the IOCtls are executed and when data is received or transmitted by the ASYNC hardware. Data Carrier Detect (DCD) is the same signal as Receiver Line Signal Detect (RLSD).

The following is a summary of the Category 01h IOCtl Commands:

Function Description
14h Reserved
34h Reserved
41h Set Bit Rate
42h Set Line Characteristics (stop, parity, data bits)
43h Extended Set Bit Rate
44h Transmit Byte Immediate
45h Set Break OFF
46h Set Modem Control Signals
47h Behave as if XOFF Received (stop transmit)
48h Behave as if XON Received (start transmit)
49h Reserved
4Bh Set Break ON
53h Set Device Control Block (DCB) Parameters
54h Set Enhanced Mode Parameters
61h Query Current Bit Rate
62h Query Line Characteristics
63h Extended Query Bit Rate
64h Query COM Status
65h Query Transmit Data Status
66h Query Modem Control Output Signals
67h Query Current Modem Input Signals
68h Query Number of Characters in Receive Queue
69h Query Number of Characters in Transmit Queue
6Dh Query COM Error
72h Query COM Event Information
73h Query Device Control Block (DCB) Parameters
74h Query Enhanced Mode Parameters

Category 03h Video Control IOCtl Commands

The following is a summary of the Category 03h Video Control IOCtl Commands:

Function Description
70h Allocate an LDT Selector
71h Deallocate an LDT Selector
72h Query Pointer Draw Address
73h Initialize Call Vector Table
74h ABIOS Pass-Through
75h Allocate an LDT Selector with Offset
76h Allocate an LDT Selector with Background Validation Options
7Eh Allocate Video Buffer
7Fh Get Address to ROM Font

Category 04h Keyboard Control IOCtl Commands

The following is a summary of the Category 04h IOCtl Commands:

Function Description
50h Set Code Page
51h Set Input Mode (Default ASCII)
52h Set Interim Character Flags
53h Set Shift State
54h Set Typematic Rate and Delay
55h Reserved
56h Set Session Manager Hot Key
57h Set KCB
58h Set Code Page Number
59h Set Read/Peek Notification
5Ah Alter Keyboard LEDs
5Bh Reserved
5Ch Set NLS and Custom Code Page
5Dh Create a New Logical Keyboard
5Eh Destroy a Logical Keyboard
71h Query Input Mode
72h Query Interim Character Flags
73h Query Shift State
74h Read Character Data Records
75h Peek Character Data Record
76h Query Session Manager Hot Key
77h Query Keyboard Type
78h Query Code Page Number
79h Translate Scan Code to ASCII
7Ah Query Keyboard Hardware ID
7Bh Query Keyboard Code Page Support Information

Category 05h Parallel Port Control IOCtl Commands

The following is a summary of Category 05h IOCtl Commands:

Function Description
42h Set Frame Control (CPL, LPI)
43h Reserved
44h Set Infinite Retry
45h Reserved
46h Initialize Parallel Port
47h Reserved
48h Activate Font
49h Reserved
4Bh Reserved
4Ch Reserved
4Dh Set Print-Job Title
4Eh Set Parallel Port Write Timeout Value
4Fh Reserved
50h Reserved
51h Reserved
52h Set Parallel Port Communication Mode
53h Set Parallel Port Data Transfer Mode
62h Query Frame Control
63h Reserved
64h Query Infinite Retry
65h Reserved
66h Query Parallel Port Status
67h Reserved
68h Reserved
69h Query Active Font
6Ah Verify Font
6Bh Reserved
6Ch Reserved
6Dh Reserved
6Eh Query Parallel Port Write Timeout Value
6Fh Reserved
70h Reserved
71h Reserved
72h Query Parallel Port Communication Mode
73h Query Parallel Port Data Transfer Mode
74h Query Parallel Port Device ID

Category 07h Mouse Control IOCtl Commands

The following is a summary of Category 07h IOCtl Commands:

07h Mouse Control IOCtl Commands
Function Description
50h Reserved
51h Notification of Display Mode Change
52h Reserved
53h Reassign Current Mouse Scaling Factors
54h Assign New Mouse Event Mask
55h Reassign Mouse Threshold Values
56h Set Pointer Shape
57h Unmark Collision Area
58h Mark Collision Area
59h Specify/Replace Pointer Screen Position
5Ah Set OS/2 Mode Pointer Draw Device Driver Address
5Bh Reserved
5Ch Set Current Physical Mouse Device Driver Status Flags
5Dh Notification of Mode Switch Completion
60h Query Number of Mouse Buttons Supported
61h Query Mouse Device Motion Sensitivity
62h Query Current Physical Mouse Device Driver Status Flags
63h Read Mouse Event Queue
64h Query Current Event Queue Status
65h Query Current Mouse Event Mask
66h Query Current Mouse Scaling Factors
67h Query Current Pointer Screen Position
68h Query Current Pointer Shape
69h Query Mouse Threshold Values
6Ah Query Physical Mouse Device Driver Level/Version Number
6Bh Query Pointing Device ID

Category 08h Logical Disk Control IOCtl Commands

The following is a summary of Category 08h IOCtl Commands:

Function Description
00h Lock Drive
01h Unlock Drive
02h Redetermine Media
03h Set Logical Map
04h Begin Format
20h Block Removable
21h Query Logical Map
22h Reserved
40h Removable Media Control
43h Set Device Parameters
44h Write Logical Track
45h Format and Verify Track
5Dh Diskette Control
5Eh Reserved
5Fh Reserved
60h Query Media Sense
63h Query Device Parameters
64h Read Logical Track
65h Verify Logical Track
66h Status

Category 09h Physical Disk Control IOCtl Commands

Category 09h is used to access physical partitionable hard disks. The handle used for Category 09h command is returned by the DosPhysicalDisk (Function 2) API function. (See the OS/2 Control Program Programming Reference for more information). This handle is used to tell the system which physical disk is accessed by the IOCtl command.

The Physical Disk Control commands relate to the entire partitionable hard disk. Direct track and sector I/O start at the beginning of the physical drive. PDSK_GETPHYSDEVICEPARAMS, describes the entire physical device.

The following is a summary of Category 09h IOCtl Commands:

Function Description
00h Lock Physical Drive
01h Unlock Physical Drive
44h Write Physical Track
63h Query Physical Device Parameters
64h Read Physical Track
65h Verify Physical Track

Category 0Ah Character Device Monitor IOCtl Command

The following is the Category 0Ah IOCtl Command:

Function  Description
   40h    Register Monitor

Category 0Bh General Device Control IOCtl Commands

The following is a summary of Category 0Bh IOCtl Commands:

Function Description
01h Flush Input Buffer
02h Flush Output Buffer
41h System Notifications for Physical Device Drivers
60h Query Monitor Support

Category 0Ch Advanced Power Management

Function Description
40h Send Power Event
41h Set Power Event Resource
42h - 44h Reserved
45h OEM APM Function
60h Query Power Status
61h Query Power Event
62h Query Power Information
63h Query Power State

Category 80h Screen Control IOCtl Commands

The following video IOCtls are defined and supported by the SCREENDD$ device driver, by way of the DosDevIOCtl call. The IOCtl category code is 80h (defined as SCREENDD_CATEGORY).

The function codes within the SCREENDD_CATEGORY are:

Function Description
00h Get Current Video Memory Bank
01h Set Current Video Memory Bank
02h-07h Reserved
08h Return Adapter Video Configuration
09h Return Manufacturer-Specific Adapter Data
0Ah Update Adapter Video Memory Information
0Bh Return Linear Address Mapped to Physical Address
0Ch-7Fh Reserved

An example of the DosDevIOCtl calling convention for the Screen IOCtls follows:

int PASCAL near videoIoctl(VOID *data,VOID *parm,USHORT function)
{
  unsigned hScreenDD;                  /* handle of SCREENDD$ dev driver */
  unsigned OpenAction;                 /* action taken to open device    */
  unsigned rc;                         /* function return code           */

  if (!(rc = DosOpen(SCREENDD_NAME, (PHFILE)&hScreenDD, (PUSHORT)&OpenAction,
     NO_SIZE, NO_ATTRIBUTES, OPEN_IF_EXISTS, NO_INHERIT+DENY_NONE+READ_WRITE,
     RESERVED_LONG)))
  {
    rc = DosDevIOCtl(data,
                     parm,
                     function,
                     SCREENDD_CATEGORY,
                     (HFILE)hScreenDD);
    DosClose(hScreenDD);
  }
  return (rc);

Category 80h OEMHLP IOCtls

The OEMHLP interface was originally designed to allow Original Equipment Manufacturers (OEMs) to modify and adapt the OS/2 operating system to run on their hardware. In the past, IBM supported the OS/2 operating system on IBM hardware only. Therefore, OEMs had to build modified versions of the OS/2 operating system. The OEMHLP interface facilitated this process.

IBM currently tests the OS/2 operating system on a wide variety of OEM hardware. It is no longer necessary for OEMs to adapt the OS/2 operating system to their machines. Now the OEMHLP interface can be used to obtain real-mode information. This information can be passed to applications and device drivers running in protect mode. Applications and physical device drivers running in protect mode cannot access BIOS through the INT interface. The OEMHLP interface allows access to BIOS information and functions that are essential to these programs.

For example, you might want to issue INT 15h calls from your device driver initialization code to determine if an Extended Industry Standard Architecture (EISA) adapter is present. The following examples show the methods to determine if a specific EISA or Micro Channel adapter is present.

Using the Query Adapter ID to Verify EISA Adapter

The following example uses the OEMHLP IOCtl interface to verify the EISA card ID:

USHORT FindMyEISACard(void)
{
  HFILE filehandle;
  USHORT action;

  EISAFunctionInfo.efi_SubFunc = OEM_GET_SLOT_INFO; /* EISA Get Slot Info */
  EISAFunctionInfo.efi_Slot    = 0;                 /* Slot 0             */

  rc = DosOpen("OEMHLP$",
               &filehandle,
               &action,
               0L,
               0,
               1,
               0x40,
               0L);
  if (rc == 0)
    {
    for(index=1;index<CFG_MAX_EISA_SLOTS;index++)   /* For each slot      */
      {
      EISAFunctionInfo.efi_Slot    = (UCHAR) index; /* Slot Number        */
      EISASlotInfo.esi_CardID  = 0;                 /* Reset Card ID value*/
      rc = DosDevIOCtl((PVOID)&EISASlotInfo,        /* Data Packet */
                       (PVOID)&EISAFunctionInfo,    /* Parm Packet */
                       (USHORT)OEMHLP_QUERYEISACONFIG,
                       (USHORT)OEMHLP_CATEGORY,
                       (HFILE)filehandle);
      /* If IOCtl successful and slot has adapter, then store away
         the adapter ID, otherwise mark as empty with a zero.
       */
      if((rc==0)&&(EISASlotInfo.esi_Error==0))
        {
        if (EISASlotInfo.esi_CardID == MYCARDID)
           DosClose(filehandle);        /* Close handle to OEMHLP$ */
           return(FOUND);
        }
      }
      DosClose(filehandle);             /* Close handle to OEMHLP$ */
    }
   return(NOTFOUND);
}
Using the DevHlp_ABIOSCall to Verify Micro Channel Adapter

The following example uses the DevHlp_ABIOSCall to verify the Micro Channel POS ID:

USHORT FindMyMicroChannelCard(void)
{
  USHORT i,rc;             /* Index and return code    */
  USHORT LID;              /* Logical ID               */

  if (GetLIDEntry(POS,0,1,&LID))
     return(NOTFOUND);

  /* Get length of RB to use for reading POS data. */

  POSLenRB.rb.RBLen = sizeof(POSLENRB);
  POSLenRB.rb.Func  = 0x01;
  POSLenRB.rb.LID   = LID;
  POSLenRB.rb.Unit  = 0;
  POSLenRB.rb.Resv1 = 0;
  POSLenRB.rb.Resv2 = 0;
  POSLenRB.Rsv1     = 0;
  POSLenRB.Rsv2     = 0;
  POSLenRB.Rsv3     = 0;
  rc = ABIOSCall( LID, &POSLenRB, 0);

  /*Is my request block big enough? */

  if ((rc==0) && (sizeof(POSRB) >= POSLenRB.RBLen))
     {
       RB.rb.RBLen = POSLenRB.RBLen;       /* request block length        */
       RB.rb.Func  = 0x0b;                 /* read stored POS data to mem */
       RB.rb.LID   = LID;                  /* Logical ID                  */
       RB.rb.Unit  = 0;
       RB.DataBuf  = (ULONG)(FARPOINTER)&POSData;

       for(i=0;i<=CFG_MAX_POS_SLOTS;i++)   /* For each slot, get POS ID   */
          {
           RB.Slot = (UCHAR)i;
           rc = ABIOSCall(LID,&RB,0);
           if((rc==0)&&(RB.rb.RetCode==0))
             if (RB.AdapterID == MYCARD)
                {
                  FreeLIDEntry(LID);
                  return(FOUND);
                }
          }
     }

  FreeLIDEntry(LID);             /* Release LID Entry */
  return(NOTFOUND);
}
OEMHLP IOCtls Summary

The following is a summary of Category 80h OEMHLP IOCtl Commands:

Function Description
00h Query OEM Adaptation Information
01h Query Machine Information
02h Query Display Combination Code
03h Return Video Fonts
04h Read EISA Slot Configuration Information - Subfunction 00
04h Read EISA Function Configuration Information - Subfunction 01
05h Query ROM BIOS Information
06h Query Miscellaneous Video Information
07h Query Video Adapter
08h Query SVGA Information
09h Query Memory Information
0Ah Query Display Mode, Query and Set (DMQS) Information
0Bh Access PCI BIOS Information
0Bh Query PCI BIOS Information - Subfunction 00h
0Bh Find PCI Device - Subfunction 01h
0Bh Find PCI Class Code - Subfunction 02h
0Bh Read PCI Configuration Space - Subfunction 03h
0Bh Write PCI Configuration Space - Subfunction 04h

Category 80h Adapter Presence-Check Services (TESTCFG.SYS)

The TESTCFG device driver provides services for automatic detection of Original Equipment Manufacturer (OEM) hardware interfaces. Functions provided by this driver are accessed entirely by opening the device name TESTCFG$ and using the following Category 80h IOCtls.

Function Description
40H Get Copy of BIOS/Adapter Memory
41H Issue an "IN" I/O Instruction
42H Issue an "OUT" I/O Instruction
60H Get Bus Architecture Function
61H Return All POS IDs
62H Return All EISA IDs

Category 80h Resource Manager IOCtl Commands

RESOURCE.SYS provides two IOCtls that allow a ring 3 application to obtain a "snapshot" of the Resource Management data structures. Obtaining a snapshot of the Resource Management data structures consists of the following two steps:

1.- A data structure representing a depth-first traversal of the Resource Manager node structure is obtained.

2.- For each node traversed, the following information is provided:

  • A Resource Manager handle to access the node.
  • The depth of the node in the tree structure.

3.- A copy of each Resource Manager node can be obtained by supplying the node handle returned in Step 1.

Function Description
01h Get Resource Manager Node Data
02h Enumerate Resource Manager Nodes

Category 80h CD-ROM Drive and Disc IOCtl Commands

The OS/2 CD-ROM Device Manager provides an interface through generic IOCtls.

The CD-ROM device driver returns error values in the range of hex FF00 through FF14. DOS DevIOCtl return codes are described in the OS/2 Programming Reference manuals.

Function Description
40h Reset Drive
44h Eject Disc
45h Close Tray
46h Lock/Unlock Door
50h Seek
60h Return Device Status
61h Identify CD-ROM Driver
63h Return Sector Size
70h Report Location of Drive Head
72h Read Long
78h Return Volume Size
79h Get UPC

Category 81h CD-ROM Audio IOCtl Commands

The OS/2 CD-ROM Device Manager provides an interface through generic IOCtls.

The CD-ROM device driver returns error values in the range of hex FF00 through FF14. DOSDevIOCtl return codes are described in the OS/2 Programming Reference manuals.

Function Description
40h Set Audio Channel Control
50h Play Audio
51h Stop Audio
52h Resume Audio
60h Return Audio-Channel Information
61h Return Audio-Disk Information
62h Return Audio-Track Information
63h Return Audio-Subchannel Q Information
65h Return Audio-Status Information

Category 81h Touch Device-Dependent Driver

All Touch device driver IOCtl commands share Category 81h commands, which are distinguished by the device name used in the device Open (PDITOU$ for the device-dependent driver, TOUCH$ for the device-independent driver).

Device-Dependent Device Driver Command Summary

The following table describes the Category 81h Touch Device-Dependent Driver IOCtl commands:

Function Description
50h Reserved.
51h
52h Set Calibration Constants
53h Read Data
54h Set Data Mode
55h Set Click-Lock Parameters
56h Set Touch Thresholds
57h Set Emulation XY Offset
58h Set Data Report Rate
59h Set Low Pass Filter
5Ah Write Memory Location
5Bh Reserved.
5Ch
5Dh
5Eh
5Fh
60h Get Calibration Constants
61h Get Data Mode
62h Get Click-Lock Parameters
63h Get Touch Thresholds
64h Get Emulation XY Offset
65h Get Data Report Rate
66h Get Low Pass Filter
67h Read Memory Location

Category 81h Touch Device-Independent Driver

All Touch device driver IOCtl commands share Category 81h commands, which are distinguished by the device name used in the device Open (PDITOU$ for the device-dependent driver, TOUCH$ for the device-independent driver).

The following lists and describes the Category 81h Touch Device-Independent Driver:

Function Description
50h Set Coordinate System
51h Reserved
52h Set Selection Mechanism
53h Set Event Mask
54h Set Queue Size
55h Set Emulation State
60h Get Coordinate System
61h Reserved
62h Get Selection Mechanism
63h Get Event Mask
64h Get Queue Size
65h Get Emulation State
66h Get Read Event Queue