summaryrefslogblamecommitdiffstats
path: root/private/os2/doc/ioctls.txt
blob: 18b82450e80023c5d136b6385841470f07f04461 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703






















































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































                                                                                     
This file contains documentation about all of the 16 bit IOCTL functions
that are supported by the 32-bit DosDevIOCTL function in Cruisers.  For
each category and function, there is a comment saying whether or not the
category or function is supported or not.  Those marked with question marks
mean that I am not sure yet how it will be supported or not.


Topic: ASYNC_IOCTL_CATEGORY         0x0001      // Supported

Topic: ASYNC_GETBAUDRATE            0x0061      // Supported

APIRET DosDevIOCtl( pusBaudRate, 0L, 0x0061, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pusBaudRate;    /* pointer to variable for baud rate */
HFILE hDevice;          /* device handle                     */

The ASYNC_GETBAUDRATE function retrieves the baud rate for the specified
serial device. The baud rate specifies the number of bits per second that
the serial device transmits or receives.

Parameter    Description
----------------------------------------------------------------------------

pusBaudRate  Points to the variable that receives the baud rate.

hDevice      Identifies the serial device that receives the device-control
             function. The handle must have been created previously by using
             the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: ASYNC_GETCOMMERROR           0x006D      // Supported

APIRET DosDevIOCtl( pfCommErr, 0L, 0x006D, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pfCommErr;    /* pointer to variable for error */
HFILE hDevice;        /* device handle                 */

The ASYNC_GETCOMMERROR function retrieves the communication error word.
After copying the error-word value to the specified variable, the function
clears the error word.

Parameter  Description
----------------------------------------------------------------------------

pfCommErr  Points to the variable that receives the communication status of
           the device. This variable can be a combination of the following
           values:

           Value                Meaning
           -----------------------------------------------------------------
           RX_QUE_OVERRUN       Receive-queue overrun. There is no room in
                                the device-driver receive queue to put a
                                character read in from the receive
                                hardware.

           RX_HARDWARE_OVERRUN  Receive-hardware overrun. A character
                                arrived before the previous character was
                                completely read. The previous character is
                                lost.

           PARITY_ERROR         The hardware detected a parity error.

           FRAMING_ERROR        The hardware detected a framing error.

hDevice    Identifies the serial device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful. When an error
occurs, the function returns an error value, and any value copied to the
variable pointed to by the pfCommErr parameter is not valid, and the
function does not clear the error word.

Comments

Other than using this function, the only way to clear the communications
error word for a device is to open the device when there are no outstanding
open handles for it. For more information, see the ASYNC_SETDCBINFO function
(0x0001, 0x0053).

                                      o

Topic: ASYNC_GETCOMMEVENT           0x0072      // Supported

APIRET DosDevIOCtl( pfEvent, 0L, 0x0072, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pfEvent;    /* pointer to variable for events */
HFILE hDevice;      /* device handle                  */

The ASYNC_GETCOMMEVENT function retrieves the communications event flags
from the internally maintained event word. After the function copies the
event flags to the specified variable, it clears the event word.

Parameter  Description
----------------------------------------------------------------------------

pfEvent    Points to the variable that receives the event flags. This
           variable can be a combination of the following values:

           Value           Meaning
           -----------------------------------------------------------------
           CHAR_RECEIVED   A character has been read from the serial-device
                           receive hardware and placed in the receive
                           queue.

           LAST_CHAR_SENT  The last character in the device-driver transmit
                           queue has been sent to the serial-device transmit
                           hardware. This does not mean there is no data to
                           send in any outstanding write requests.

           CTS_CHANGED     The clear-to-send (CTS) signal has changed
                           state.

           DSR_CHANGED     The data-set-ready (DSR) signal has changed
                           state.

           DCD_CHANGED     The data-carrier-detect (DCD) signal has changed
                           state.

           BREAK_DETECTED  A break has been detected.

           ERROR_OCCURRED  A parity, framing, or overrun error has occurred.
                           An overrun can be a receive hardware overrun or a
                           receive queue overrun.

           RI_DETECTED     The trailing edge of the ring indicator (RI) has
                           been detected.

hDevice    Identifies the serial device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

This function clears the event word only when it is successful. The event
word remains unchanged until the device is fully closed (there are no
outstanding open handles) and then reopened.

                                      o

Topic: ASYNC_GETCOMMSTATUS          0x0064      // Supported

APIRET DosDevIOCtl( pbStatus, 0L, 0x0064, ASYNC_IOCTL_CATEGORY, hDevice )
PBYTE pbStatus;    /* pointer to variable for status */
HFILE hDevice;     /* device handle                  */

The ASYNC_GETCOMMSTATUS  function retrieves the communication status of the
specified device.

Parameter  Description
----------------------------------------------------------------------------

pbStatus   Points to the variable that receives the communication status.
           This variable can be a combination of the following values:

           Value                      Meaning
           -----------------------------------------------------------------
           TX_WAITING_FOR_CTS         Transmission is waiting for the
                                      clear-to-send (CTS) signal to be
                                      turned on. For a full description, see
                                      the ASYNC_SETDCBINFO function (0x0001,
                                      0x0053).

           TX_WAITING_FOR_DSR         Transmission is waiting for the
                                      data-set-ready (DSR) signal to be
                                      turned on. For a full description, see
                                      the ASYNC_SETDCBINFO function (0x0001,
                                      0x0053).

           TX_WAITING_FOR_DCD         Transmission is waiting for the
                                      data-carrier-detected (DCD) signal to
                                      be turned on. For a full description,
                                      see the ASYNC_SETDCBINFO function
                                      (0x0001, 0x0053).

           TX_WAITING_FOR_XON         Transmission is waiting because the
                                      XOFF character is received. For a full
                                      description, see the following
                                      "Comments" section.

           TX_WAITING_TO_SEND_XON     Transmission is waiting because the
                                      XOFF character is transmitted. For a
                                      full description, see the following
                                      "Comments" section.

           TX_WAITING_WHILE_BREAK_ON  Transmission is waiting because a
                                      break is being transmitted. For a full
                                      description, see the ASYNC_SETBREAKON
                                      function (0x0001, 0x004B).

           TX_WAITING_TO_SEND_IMM     Character is waiting to transmit
                                      immediately. For a full description,
                                      see the ASYNC_TRANSMITIMM function
                                      (0x0001, 0x0044).

           RX_WAITING_FOR_DSR         Receive state is waiting for the
                                      data-set-ready (DSR) signal to be
                                      turned on. For a full description, see
                                      the ASYNC_SETDCBINFO function (0x0001,
                                      0x0053).

hDevice    Identifies the serial device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

Transmit status indicates why transmission is not occurring, regardless of
whether or not there is data to transmit. However, the device driver must be
enabled for the given condition (for example, enabled for output handshaking
for the modem-control signal) for the status to reflect that the device
driver is waiting for the given condition to transmit.

For example, TX_WAITING_FOR_CTS means that the device driver puts receive
characters in the device-driver receive queue, the device driver is not
waiting to transmit a character immediately, and characters from the
device-driver transmit queue are not transmitted because the clear-to-send
(CTS) signal for output handshaking is used and CTS does not have the proper
value.

The communication status can include TX_WAITING_TO_SEND_XON if the device
driver is enabled for automatic transmit flow control (XON/XOFF) or if the
ASYNC_STOPTRANSMIT function (0x0001, 0x0047) has been used to tell the
device driver to function as if an XOFF character is received. The
ASYNC_TRANSMITIMM function (0x0001, 0x0044) can still be used to transmit
characters immediately. The device driver can still automatically transmit
XON and XOFF characters due to automatic receive flow control (XON/XOFF)
when the device driver is in this state.

The communication status can include TX_WAITING_FOR_XON if the device driver
is enabled for automatic receive flow control. When in this state, the
ASYNC_TRANSMITIMM function (0x0001, 0x0044) can still be used to transmit
characters immediately, and the device driver can still automatically
transmit XON characters.

                                      o

Topic: ASYNC_GETDCBINFO             0x0073      // Supported

APIRET DosDevIOCtl( pusDCB, 0L, 0x0073, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pusDCB;    /* pointer to structure for device-control information */
HFILE hDevice;     /* device handle                                       */

The ASYNC_GETDCBINFO function retrieves device-control block information.

Parameter  Description
----------------------------------------------------------------------------

pusDCB     Points to the DCBINFO structure that receives the device-control
           block information.

hDevice    Identifies the serial device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful. When an error
occurs, the function returns an error value, and any data copied to the
DCBINFO structure pointed to by the pusDCB parameter is not valid.

Comments

To ensure that only valid values are set in the device-control block, the
program should call the ASYNC_GETDCBINFO function to fill the block, and
then modify the settings and call the ASYNC_SETDCBINFO function with the
modified block.

                                      o

Topic: ASYNC_GETINQUECOUNT          0x0068      // Supported

APIRET DosDevIOCtl( pcReceiveQue, 0L, 0x0068, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pcReceiveQue;    /* pointer to structure for character count */
HFILE hDevice;           /* device handle                            */

The ASYNC_GETINQUECOUNT function retrieves the number of characters in the
receive queue.

Parameter     Description
----------------------------------------------------------------------------

pcReceiveQue  Points to the RXQUEUE structure that receives the count of
              characters in the receive queue.

hDevice       Identifies the serial device that receives the device-control
              function. The handle must have been created previously by
              using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The device-driver receive queue is a memory buffer between the memory
pointed to by the read-request packet and the receive hardware for this
serial device. The application may not assume that there are no unsatisfied
read requests if there are characters in the device-driver receive queue.
The behavior of data movement between the read request and the receive queue
may change from release to release of the device driver. Programs should not
be written to have a dependency on this information.

Programs should be written to be independent of the receive queue being a
fixed size. The information in this field allows the application to get the
size of the receive queue. The current size of the receive queue is
approximately 1K but is subject to change.

The application should be written to avoid device-driver receive queue
overruns by using an application-to-application block protocol with the
system the application is communicating with.

                                      o

Topic: ASYNC_GETLINECTRL            0x0062      // Supported

APIRET DosDevIOCtl( pbLineCtrl, 0L, 0x0062, ASYNC_IOCTL_CATEGORY, hDevice )
PBYTE pbLineCtrl;    /* pointer to structure for control settings */
HFILE hDevice;       /* device handle                             */

The ASYNC_GETLINECTRL function retrieves the line characteristics (stop
bits, parity, data bits, break) for the specified device.

Parameter   Description
----------------------------------------------------------------------------

pbLineCtrl  Points to a LINECONTROL structure that receives the settings for
            the number of data bits, parity, and number of stop bits.

hDevice     Identifies the serial device that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: ASYNC_GETLINESTATUS          0x0065      // Supported

APIRET DosDevIOCtl( pbTransStatus, 0L, 0x0065, ASYNC_IOCTL_CATEGORY, hDevice )
PBYTE pbTransStatus;    /* pointer to variable for status */
HFILE hDevice;          /* device handle                  */

The ASYNC_GETLINESTATUS function retrieves the data-transmission status for
the specified serial device.

Parameter      Description
----------------------------------------------------------------------------

pbTransStatus  Points to the variable that receives the data-transmission
               status. This variable can be a combination of the following
               values:

               Value                   Meaning
               -------------------------------------------------------------
               WRITE_REQUEST_QUEUED    Write-request packets in progress or
                                       queued.

               DATA_IN_TX_QUE          Data in the device-driver transmit
                                       queue.

               HARDWARE_TRANSMITTING   Transmit hardware currently
                                       transmitting data.

               CHAR_READY_TO_SEND_IMM  Character waiting to be transmitted
                                       immediately.

               WAITING_TO_SEND_XON     Waiting to automatically transmit
                                       XON.

               WAITING_TO_SEND_XOFF    Waiting to automatically transmit
                                       XOFF.

hDevice        Identifies the serial device that receives the device-control
               function. The handle must have been created previously by
               using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: ASYNC_GETMODEMINPUT          0x0067      // Supported

APIRET DosDevIOCtl( pbCtrlSignals, 0L, 0x0067, ASYNC_IOCTL_CATEGORY, hDevice )
PBYTE pbCtrlSignals;    /* pointer to variable for control signals */
HFILE hDevice;          /* device handle                           */

The ASYNC_GETMODEMINPUT function retrieves the modem-control input signals
for the specified device.

Parameter      Description
----------------------------------------------------------------------------

pbCtrlSignals  Points to the variable that receives the modem-control
               signals. This variable can be a combination of the following
               values:

               Value   Meaning
               -------------------------------------------------------------
               CTS_ON  Clear-to-send (CTS) signal is on. If not given, the
                       signal is off.

               DSR_ON  Data-set-ready (DSR) signal is on. If not given, the
                       signal is off.

               RI_ON   Ring-indicator (RI) signal is on. If not given, the
                       signal is off.

               DCD_ON  Data-carrier-detect (DCD) signal is on. If not given,
                       the signal is off.

hDevice        Identifies the serial device that receives the device-control
               function. The handle must have been created previously by
               using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: ASYNC_GETMODEMOUTPUT         0x0066      // Supported

APIRET DosDevIOCtl( pbCtrlSignals, 0L, 0x0066, ASYNC_IOCTL_CATEGORY, hDevice )
PBYTE pbCtrlSignals;    /* pointer to variable for control signals */
HFILE hDevice;          /* device handle                           */

The ASYNC_GETMODEMOUTPUT function retrieves the modem-control output signals
for the specified device.

Parameter      Description
----------------------------------------------------------------------------

pbCtrlSignals  Points to the variable that receives the modem-control
               signals. This variable can be one or both of the following
               values:

               Value   Meaning
               -------------------------------------------------------------
               DTR_ON  Data-terminal-ready (DTR) signal is on. If not given,
                       the signal is off.

               RTS_ON  Request-to-send (RTS) signal is on. If not given, the
                       signal is off.

hDevice        Identifies the serial device that receives the device-control
               function. The handle must have been created previously by
               using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: ASYNC_GETOUTQUECOUNT         0x0069      // Supported

APIRET DosDevIOCtl( pcTransmitQue, 0L, 0x0069, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pcTransmitQue;    /* pointer to structure for character count */
HFILE hDevice;            /* device handle                            */

The ASYNC_GETOUTQUECOUNT function retrieves a count of characters in the
transmit queue.

Parameter      Description
----------------------------------------------------------------------------

pcTransmitQue  Points to the RXQUEUE structure that receives the count of
               characters in the transmit queue.

hDevice        Identifies the serial device that receives the device-control
               function. The handle must have been created previously by
               using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The device-driver transmit queue is a memory buffer between the memory
pointed to by the write-request packet and the transmit hardware for this
serial device. If the transmit queue is empty, the program may not assume
that all write requests are completed or that no write requests are
outstanding. The behavior of data movement between the write request and the
transmit queue may change from release to release of the device driver.
Programs should not be written to have a dependency on this information.

Programs should be written to be independent of the transmit queue being a
fixed size. The information in this field allows the application to get the
size of the transmit queue. The current size of the transmit queue is
approximately 128 bytes but is subject to change.

                                      o

Topic: ASYNC_SETBAUDRATE            0x0041      // Supported

APIRET DosDevIOCtl( 0L, pusBitRate, 0x0041, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pusBitRate;    /* pointer to variable with baud rate */
HFILE hDevice;         /* device handle                      */

The ASYNC_SETBAUDRATE function sets the baud rate for the specified serial
device. The baud rate specifies the number of bits per second that the
serial device transmits or receives.

Parameter   Description
----------------------------------------------------------------------------

pusBitRate  Points to the variable that contains the baud rate. This
            parameter can be any one of the following values: 110, 150, 300,
            600, 1200, 2400, 4800, 9600, or 19200.

hDevice     Identifies the serial device that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
the specified baud rate is out of range or an error occurs.

Comments

The initial rate for a serial device is 1200 baud. Once the rate is set, it
remains unchanged until set again, even if the device is closed and then
reopened.

                                      o

Topic: ASYNC_SETBREAKOFF            0x0045      // Supported

APIRET DosDevIOCtl( pfCommErr, 0L, 0x0045, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pfCommErr;    /* pointer to variable for error value */
HFILE hDevice;        /* device handle                       */

The ASYNC_SETBREAKOFF function turns off the break character. The device
driver stops generating a break signal. It is not considered an error if the
device driver is not generating a break signal. The device driver then
resumes transmitting characters, taking into account all the other reasons
why it may or may not transmit characters.

Parameter  Description
----------------------------------------------------------------------------

pfCommErr  Points to the variable that receives the communication status of
           the device. This variable can be a combination of the following
           values:

           Value                Meaning
           -----------------------------------------------------------------
           RX_QUE_OVERRUN       Receive queue overrun. There is no room in
                                the device-driver receive queue to put a
                                character read in from the receive
                                hardware.

           RX_HARDWARE_OVERRUN  Receive hardware overrun. A character
                                arrived before the previous character was
                                completely read. The previous character is
                                lost.

           PARITY_ERROR         The hardware detected a parity error.

           FRAMING_ERROR        The hardware detected a framing error.

           The function sets the variable to zero if it encounters an
           error.

hDevice    Identifies the serial device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: ASYNC_SETBREAKON             0x004B      // Supported

APIRET DosDevIOCtl( pfCommErr, 0L, 0x004B, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pfCommErr;    /* pointer to variable for error value */
HFILE hDevice;        /* device handle                       */

The ASYNC_SETBREAKON function turns on the break character. The device
driver generates the break signal immediately. It is not considered an error
if the device driver is already generating a break signal. The device driver
does not wait for the transmit hardware to become empty. However, more data
will not be given to the transmit hardware until the break is turned off.
The break signal will always be transmitted, regardless of whether the
device driver is or is not transmitting characters due to other reasons.

Parameter  Description
----------------------------------------------------------------------------

pfCommErr  Points to the variable that receives the communication status of
           the device. This variable can be a combination of the following
           values:

           Value                Meaning
           -----------------------------------------------------------------
           RX_QUE_OVERRUN       Receive queue overrun. There is no room in
                                the device-driver receive queue to put a
                                character read in from the receive
                                hardware.

           RX_HARDWARE_OVERRUN  Receive hardware overrun. A character
                                arrived before the previous character was
                                completely read. The previous character is
                                lost.

           PARITY_ERROR         The hardware detected a parity error.

           FRAMING_ERROR        The hardware detected a framing error.

           The function sets the variable to zero if it encounters an
           error.

hDevice    Identifies the serial device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

Closing the device turns off the break character if there are no outstanding
open device handles.

                                      o

Topic: ASYNC_SETDCBINFO             0x0053      // Supported

APIRET DosDevIOCtl( 0L, pusDCB, 0x0053, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pusDCB;   /* pointer to structure with device-control information */
HFILE hDevice;    /* device handle                                        */

The ASYNC_SETDCBINFO function sets device-control block information.

Parameter  Description
----------------------------------------------------------------------------

pusDCB     Points to the DCBINFO structure that receives the device-control
           block information.

hDevice    Identifies the serial device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful. When an error
occurs, the function returns an error value, and the device-control block
characteristics of the device driver for this serial device remain
unchanged.

Comments

A program can prevent making unwanted changes to device modes by calling the
ASYNC_GETDCBINFO function (0x0001,0x0073) to retrieve a copy of the current
DCB. The program can then modify only those fields it needs to and use the
modified DCB with the ASYNC_SETDCBINFO function.

                                      o

Topic: ASYNC_SETLINECTRL            0x0042      // Supported

APIRET DosDevIOCtl( 0L, pbLineCtrl, 0x0042, ASYNC_IOCTL_CATEGORY, hDevice )
PBYTE pbLineCtrl;    /* pointer to structure with line settings */
HFILE hDevice;       /* device handle                           */

The ASYNC_SETLINECTRL function sets the line characteristics (stop bits,
parity, and data bits) for the specified serial device.

Parameter   Description
----------------------------------------------------------------------------

pbLineCtrl  Points to the LINECONTROL structure that contains the settings
            for the number of data bits, parity, and number of stop bits.

hDevice     Identifies the serial device that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
any of the specified line characteristics is out of range. When an error
occurs, line characteristics remain unchanged.

Comments

When a device is first opened, the initial line characteristics are 7 data
bits, even parity, and 1 stop bit. After line characteristics are changed,
they remain changed until the function is used again, even if the device is
closed and reopened.

If the number of data bits is less than 8, the device driver fills with
zeros the unused high-order bits of each character it receives from the
device; the device driver ignores the unused high-order bits of characters
it receives from the program. Therefore, if the number of data bits is 7 but
the XOFF character is 0x80, the device driver does not recognize the XOFF
character even when automatic-transmission control is enabled. If the error
substitution character is 0x80, the device driver still places 0x80 in the
receive queue. Programs must see that these characters match the specified
data size. Any characters that were in the receive queue before the function
is called remain unchanged.

                                      o

Topic: ASYNC_SETMODEMCTRL           0x0046      // Supported

APIRET DosDevIOCtl( pfCommErr, pbCtrlSignals, 0x0046, ASYNC_IOCTL_CATEGORY, hDevice )
PUSHORT pfCommErr;      /* pointer to variable for error value       */
PBYTE pbCtrlSignals;    /* pointer to structure with control signals */
HFILE hDevice;          /* device handle                             */

The ASYNC_SETMODEMCTRL function sets the modem-control signals. This
function turns on or off the data-terminal-ready (DTR) and ready-to-transmit
(RTS) signals (initially, the DTR and RTS signals are turned off).

Parameter      Description
----------------------------------------------------------------------------

pfCommErr      Points to the variable that receives the communication status
               of the device. This variable can be a combination of the
               following values:

               Value                Meaning
               -------------------------------------------------------------
               RX_QUE_OVERRUN       Receive queue overrun. There is no room
                                    in the device driver receive queue to
                                    put a character read in from the receive
                                    hardware.

               RX_HARDWARE_OVERRUN  Receive hardware overrun. A character
                                    arrived before the previous character
                                    was completely read. The previous
                                    character is lost.

               PARITY_ERROR         The hardware detected a parity error.

               FRAMING_ERROR        The hardware detected a framing error.

               The function sets the variable to zero if it encounters an
               error.

pbCtrlSignals  Points to the MODEMSTATUS structure that contains the
               settings for the modem-control signals.

hDevice        Identifies the serial device that receives the device-control
               function. The handle must have been created previously by
               using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
the specified signal settings are invalid. When an error occurs, the signal
settings remain unchanged.

Comments

This function must not be used to enable or disable the DTR or RTS signal if
the signal is being used for input handshaking or toggling on transmit. Any
attempt to do so will cause a "general failure" error.

Although the function copies the communication error status to the variable
pointed to by the pfCommErr parameter, it does not clear the error.

If the serial device is opened after having been closed, the DTR and RTS
signals are set to the values specified by the DTR control mode and the RTS
control mode, respectively. For a full description, see the
ASYNC_SETDCBINFO function (0x0001,0x0053).

After a serial device has been closed, the device driver turns off the DTR
and RTS signals, but only after the device has transmitted all data and has
waited for at least as long as it would take to transmit 10 additional
characters.

                                      o

Topic: ASYNC_STARTTRANSMIT          0x0048      // Supported

APIRET DosDevIOCtl( 0L, 0L, 0x0048, ASYNC_IOCTL_CATEGORY, hDevice )
HFILE hDevice;    /* device handle */

The ASYNC_STARTTRANSMIT function starts transmission. This function allows
data transmission to be resumed by the device driver if data transmission is
halted due to the ASYNC_STOPTRANSMIT function (0x0001,0x0047) or due to an
XOFF character being received while the device driver is in automatic
transmit flow control mode. This function is similar to the device receiving
the XON character.

Parameter  Description
----------------------------------------------------------------------------

hDevice    Identifies the serial device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

There may be other reasons why transmission is disabled; transmission may
not be resumed. For more information, see the ASYNC_GETCOMMSTATUS function
(0x0001,0x0064).

                                      o

Topic: ASYNC_STOPTRANSMIT           0x0047      // Supported

APIRET DosDevIOCtl( 0L, 0L, 0x0047, ASYNC_IOCTL_CATEGORY, hDevice )
HFILE hDevice;    /* device handle */

The ASYNC_STOPTRANSMIT function stops the device from transmitting. This
function stops data transmission by preventing the device driver from
sending additional data to the transmit hardware. This function is similar
to the device receiving the XOFF character.

Parameter  Description
----------------------------------------------------------------------------

hDevice    Identifies the serial device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

If automatic-transmission control is enabled, this request causes the device
driver to behave exactly as if it received the XOFF character. Transmission
can be resumed if an XON character is received by the device driver, if an
ASYNC_STARTTRANSMIT (0x0001,0x0048) function is received, or if the device
driver is told to disable automatic-transmission control and in the previous
state automatic-transmission control was enabled.

If automatic-transmission control is disabled, the ASYNC_STARTTRANSMIT
function (0x0001,0x0048) must be called for transmission to resume. If,
after this request is received, the device driver is told to enable
automatic-transmission control, transmission is still disabled. It can be
re-enabled by any of the scenarios discussed above.

There still may be other reasons why transmission may be disabled. For more
information, see the ASYNC_GETCOMMSTATUS  function (0x0001,0x0064).

                                      o

Topic: ASYNC_TRANSMITIMM            0x0044      // Supported

APIRET DosDevIOCtl( 0L, pbChar, 0x0044, ASYNC_IOCTL_CATEGORY, hDevice )
PBYTE pbChar;    /* pointer to character */
FILE hDevice;    /* device handle        */

The ASYNC_TRANSMITIMM function transmits the specified byte immediately.

Parameter  Description
----------------------------------------------------------------------------

pbChar     Points to the character to be transmitted.

hDevice    Identifies the serial device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The device driver queues the character as the next character to be
transmitted even if there are already characters in the transmit queue.

If automatic-receiving control is enabled, an XON or XOFF character may be
transmitted before the requested character.

The function always returns before the character is actually transmitted.

If a character is already waiting to be transmitted immediately, the
function returns an error. The ASYNC_GETCOMMSTATUS  function (0x0001,0x0064)
can be used to determine whether a character is currently waiting to be
transmitted immediately.

The device driver will not immediately transmit the character that is
waiting to be transmitted immediately if the device driver is not
transmitting characters due to modem-control signal-output handshaking or if
the device driver is currently transmitting a break.

If the device driver is not transmitting characters due to automatic
transmission or receiving control (XON/XOFF) being enabled or due to
operating as if an XOFF character had been received, the device driver still
transmits a character that is waiting to be transmitted immediately due to
this request. An application that requests that the device driver transmit a
character immediately if automatic transmission or receiving control is
enabled may cause unexpected results to happen to the communications line
flow control protocol.

This function is generally used to manually send XON and XOFF characters.

The character waiting to be transmitted immediately is not considered part
of the device driver transmit queue and is not flushed due to a flush
request. XON/XOFF characters that are automatically transmitted due to
automatic-receiving control may or may not be placed ahead of the character
waiting to be transmitted immediately. Applications should not be dependent
on this ordering.

                                      o

Topic: DEV_IOCTL_CATEGORY           0x000B      // Supported

Topic: DEV_FLUSHINPUT               0x0001      // Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x0001, DEV_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to variable with command */
HFILE hDevice;      /* device handle                    */

The DEV_FLUSHINPUT function flushes the input buffer.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the variable that contains a reserved value. This value
           must be zero.

hDevice    Identifies the device that receives the device-control function.
           The handle must have been created previously by using the
           DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: DEV_FLUSHOUTPUT              0x0002      // Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x0002, DEV_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to variable with command */
HFILE hDevice;      /* device handle                    */

The DEV_FLUSHOUTPUT function flushes the output buffer.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the variable that contains a reserved value. This value
           must be zero.

hDevice    Identifies the device that receives the device-control function.
           The handle must have been created previously by using the
           DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: DEV_QUERYMONSUPPORT          0x0060      // Supported, returns error

APIRET DosDevIOCtl( 0L, pbCommand, 0x0060, DEV_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to variable with command */
HFILE hDevice;      /* device handle                    */

The DEV_QUERYMONSUPPORT function queries a device driver for monitor
support.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the variable that contains a reserved value. This value
           must be zero.

hDevice    Identifies the device that receives the device-control function.
           The handle must have been created previously by using the
           DosOpen function.

Return Value

The return value is zero if the device supports character monitors or an
error value if an error occurs.

                                      o

Topic: DSK_IOCTL_CATEGORY           0x0008      // Supported, mostly


Topic: DSK_BLOCKREMOVABLE           0x0020      // Supported

APIRET DosDevIOCtl( pfNonRemovable, pbCommand, 0x0020, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pfNonRemovable;    /* pointer to removable/nonremovable flag */
PBYTE pbCommand;         /* pointer to variable with command       */
HFILE hDevice;           /* device handle                          */

The DSK_BLOCKREMOVABLE function indicates whether the block device is
removable.

Parameter       Description
----------------------------------------------------------------------------

pfNonRemovable  Points to the variable that receives the medium type. This
                variable is 0x0000 if the medium is removable or 0x0001 if
                it is nonremovable.

pbCommand       Points to the variable that contains a reserved value. This
                value must be zero.

hDevice         Identifies the disk-drive that receives the device-control
                function. The handle must have been created previously by
                using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: DSK_FORMATVERIFY             0x0045      // Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x0045, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to structure with command */
HFILE hDevice;      /* device handle                     */

The DSK_FORMATVERIFY function formats and verifies a track on a disk drive
according to the information passed in the format table. The format table is
passed to the controller and the controller performs whatever operations are
necessary for formatting.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the TRACKFORMAT structure that contains information
           about the format operation.

hDevice    Identifies the disk-drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

Some controllers do not support formatting tracks with varying sector sizes.
The program must make sure that the sector sizes specified in the format
table are all the same.

                                      o

Topic: DSK_GETDEVICEPARAMS          0x0063      // Not Supported (?????)

APIRET DosDevIOCtl( pbBPB, pbCommand, 0x0063, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbBPB;        /* pointer to structure for BIOS parameter blocks */
PBYTE pbCommand;    /* pointer to variable with command               */
HFILE hDevice;      /* device handle                                  */

The DSK_GETDEVICEPARAMS function retrieves the device parameters for an MS
OS/2 block device. The device driver maintains two BIOS parameter blocks
(BPB) for each disk drive. One block corresponds to the medium currently in
the disk drive. The other is a recommended BPB, based on the type of medium
that corresponds to the physical device. For example, a high-density disk
drive has a BPB for a 96 tracks-per-inch (tpi) floppy disk; a low-density
disk drive has a BPB for a 48-tpi floppy disk.

Parameter  Description
----------------------------------------------------------------------------

pbBPB      Points to the BIOSPARAMETERBLOCK structure that receives the
           BPB.

pbCommand  Points to the variable that specifies which BPB to retrieve. If
           the variable is 0x0000, the function retrieves the recommended
           BPB for the drive (the BPB for the physical device). If the
           variable is 0x0001, the function retrieves the BPB for the medium
           currently in the drive.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: DSK_GETLOGICALMAP            0x0021      // Supported (?????)

APIRET DosDevIOCtl( pbDrive, pbCommand, 0x0021, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbDrive;      /* pointer to variable for drive number */
PBYTE pbCommand;    /* pointer to variable with command     */
HFILE hDevice;      /* device handle                        */

The DSK_GETLOGICALMAP function retrieves the mapping of a logical drive.

Parameter  Description
----------------------------------------------------------------------------

pbDrive    Points to the variable that receives the logical-drive number.
           This can be 1 for drive A, 2 for drive B, and so on. The function
           sets the variable to zero if only one logical drive is mapped to
           the physical drive.

pbCommand  Points to a variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the physical device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: DSK_LOCKDRIVE                0x0000      // Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x0000, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to variable with command */
HFILE hDevice;      /* device handle                    */

The DSK_LOCKDRIVE function locks a disk drive, preventing file I/O by
another process on the volume in the disk drive. This function succeeds if
there is only one file handle open on the volume in the disk drive because
the desired result is to exclude all other I/O to the volume.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: DSK_READTRACK                0x0064      // Supported

APIRET DosDevIOCtl( pbBuffer, pbCommand, 0x0064, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbBuffer;     /* pointer to buffer for data        */
PBYTE pbCommand;    /* pointer to structure with command */
HFILE hDevice;      /* device handle                     */

The DSK_READTRACK function reads from a track on a specified disk drive. The
track table passed in the call determines the sector number, which is passed
to the disk controller for the operation. When the sectors are odd-numbered
or nonconsecutive, the request is broken into an appropriate number of
single-sector operations, and one sector at a time is read.

Parameter  Description
----------------------------------------------------------------------------

pbBuffer   Points to the buffer that receives data read from the track.

pbCommand  Points to the TRACKLAYOUT structure that contains the information
           about the read operation.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The device driver will not correctly read sectors of sizes other than 512
bytes if reading would generate a direct-memory-access (DMA) violation
error. Programs must ensure that this error does not occur.

                                      o

Topic: DSK_REDETERMINEMEDIA         0x0002      // Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x0002, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to variable with command */
HFILE hDevice;      /* device handle                    */

The DSK_REDETERMINEMEDIA function redetermines the media on a block device
and updates the volume in the drive. This function is normally issued after
the volume identification information has been changed (for example, by
formatting the disk). This function should be called only if the volume is
locked.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: DSK_SETDEVICEPARAMS          0x0043      // Not Supported (?????)

APIRET DosDevIOCtl( pbBPB, pbCommand, 0x0043, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbBPB;        /* pointer to structure with BIOS parameter blocks */
PBYTE pbCommand;    /* pointer to buffer with command                  */
HFILE hDevice;      /* device handle                                   */

The DSK_SETDEVICEPARAMS function sets the device parameters for an MS OS/2
block device. The device driver maintains two BIOS parameter blocks (BPB)
for each disk drive. One block is the BPB that corresponds to the medium
currently in the disk drive. The other block is a recommended BPB, based on
the type of medium that corresponds to the physical device. For example, a
high-density disk drive has a BPB for a 96 tracks per inch (tpi) floppy
disk; a low-density disk drive has a BPB for a 48-tpi floppy disk.

Parameter  Description
----------------------------------------------------------------------------

pbBPB      Points to the BIOSPARAMETERBLOCK structure that contains the
           device parameters to be set for the drive.

pbCommand  Point to the variable that contains the command description. This
           variable can be one of the following values:

           Value                   Meaning
           -----------------------------------------------------------------
           BUILD_BPB_FROM_MEDIUM   Build the BIOS parameter block (BPB) from
                                   the medium for all subsequent build BPB
                                   requests.

           REPLACE_BPB_FOR_DEVICE  Change the default BPB for the physical
                                   device.

           REPLACE_BPB_FOR_MEDIUM  Change the BPB for the medium to the
                                   specified BPB. Return the new BPB as the
                                   BPB for the medium for all subsequent
                                   build BPB requests.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: DSK_SETLOGICALMAP            0x0003      // Supported (?????)

APIRET DosDevIOCtl( pbDrive, pbCommand, 0x0003, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbDrive;      /* pointer to variable with drive number  */
PBYTE pbCommand;    /* pointer to variable with command       */
HFILE hDevice;      /* device handle                          */

The DSK_SETLOGICALMAP function sets the logical-drive mapping for a block
device.

Parameter  Description
----------------------------------------------------------------------------

pbDrive    Points to the variable that contains the logical-drive number.
           This can be 1 for drive A, 2 for drive B, and so on. When the
           function returns, it copies the specified drive's current
           logical-drive number to the variable. If only one logical device
           is mapped to the physical drive, the function sets the variable
           to zero.

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: DSK_SYNC                     0x005D      // Not Supported (?????)

APIRET DosDevIOCtl( pbBuffer, pbCommand, 0x005D, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbBuffer;     /* pointer to buffer with data       */
PBYTE pbCommand;    /* pointer to structure with command */
HFILE hDevice;      /* device handle                     */

The DSK_SYNC function synchronizes disk I/O operations.

Parameter  Description
----------------------------------------------------------------------------

pbBuffer   Not used; must be zero.

pbCommand  Points to the synchronization operation.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

Some I/O operations cannot be overlapped with disk operations. This IOCtl
function allows the disk device driver to be instructed to complete
in-process operations, and then queue all further requests for disk I/O. A
second call must be made, with pbCommand set to 0x0000, to instruct the disk
device driver to release queued disk I/O and resume normal processing.

                                      o

Topic: DSK_UNLOCKDRIVE              0x0001      // Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x0001, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to variable with command */
HFILE hDevice;      /* device handle                    */

The DSK_UNLOCKDRIVE function unlocks a drive. The drive requires the locked
volume represented by the handle.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: DSK_VERIFYTRACK              0x0065      // Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x0065, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to structure with command */
HFILE hDevice;      /* device handle                     */

The DSK_VERIFYTRACK function verifies an operation on a specified disk
drive.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the TRACKLAYOUT structure that contains information
           about the verification operation.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The track-layout table passed in the function determines the sector number,
which is passed to the disk controller. When the sectors are odd-numbered or
nonconsecutive, the request is broken into an appropriate number of
single-sector operations, and one sector at a time is verified.

                                      o

Topic: DSK_WRITETRACK               0x0044      // Supported

APIRET DosDevIOCtl( pbBuffer, pbCommand, 0x0044, DSK_IOCTL_CATEGORY, hDevice )
PBYTE pbBuffer;     /* pointer to buffer with data       */
PBYTE pbCommand;    /* pointer to structure with command */
HFILE hDevice;      /* device handle                     */

The DSK_WRITETRACK function writes to a track on a specified disk drive.

Parameter  Description
----------------------------------------------------------------------------

pbBuffer   Points to the buffer that contains the data to be written.

pbCommand  Points to the TRACKLAYOUT structure that contains information
           about the write operation.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The track-layout table passed in the function determines the sector number,
which is passed to the disk controller. When the sectors are odd-numbered or
nonconsecutive, the request is broken into an appropriate number of
single-sector operations, and one sector at a time is written.

                                      o

Topic: KBD_IOCTL_CATEGORY           0x0004      // Not Supported, mostly

Topic: KBD_CREATE                   0x005D      // Not Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x005D, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to buffer with handle and pid */
HFILE hDevice;      /* device handle                         */

The KBD_CREATE function allocates memory for a logical keyboard (KCB). This
function obtains physical memory for a new logical keyboard. The process ID
and a logical-keyboard handle passed by the caller stored in allocated
memory for use later by the KBD_SETKCB function. A logical keyboard is not
created if the handle is zero.

Parameter  Description
----------------------------------------------------------------------------


pbCommand  Points to the buffer that contains the value to use as the
           logical-keyboard handle and the code-page identifier to use with
           the logical keyboard.

hDevice    Identifies the keyboard that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
the logical keyboard cannot be created.

                                      o

Topic: KBD_DESTROY                  0x005E      // Not Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x005E, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to buffer with handle and pid */
HFILE hDevice;      /* device handle                         */

The KBD_DESTROY function frees memory for a logical keyboard (KCB). This
function searches for the existing logical keyboard that has the specified
logical-keyboard handle and process ID combination and frees the physical
memory associated with the logical keyboard. No action is taken if the
specified handle is zero.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the buffer that contains the logical-keyboard handle.

hDevice    Identifies the keyboard that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
the logical keyboard identified by the given handle cannot be found.

                                      o

Topic: KBD_GETCODEPAGEID            0x0078      // Not Supported

APIRET DosDevIOCtl( pbCPID, 0L, 0x0078, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbCPID;     /* pointer to buffer for code page id */
HFILE hDevice;    /* device handle                     */

The KBD_GETCODEPAGEID function retrieves the identifier of the code page
being used by the current logical keyboard.

Parameter  Description
----------------------------------------------------------------------------

pbCPID     Points to the CPID structure that receives the code-page
           identifier.

hDevice    Identifies the keyboard that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

This function sets the identifier to zero to indicate that PC US 437 is
being used.

                                      o

Topic: KBD_GETINPUTMODE             0x0071      // Supported

APIRET DosDevIOCtl( pbInputMode, 0L, 0x0071, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbInputMode;    /* pointer to variable for input mode */
HFILE hDevice;        /* device handle                      */

The KBD_GETINPUTMODE function retrieves the input mode of the screen group
of the active process. The input mode defines whether the following keys are
processed as commands or as keystrokes: CTRL+C, CTRL+BREAK, CTRL+S, CTRL+P,
SCROLL LOCK, PRTSC.

Parameter    Description
----------------------------------------------------------------------------

pbInputMode  Points to the variable that receives the input mode. If the
             variable is ASCII_MODE, the keyboard has ASCII input mode. If
             the variable is BINARY_MODE, the keyboard has binary input
             mode.

hDevice      Identifies the keyboard that receives the device-control
             function. The handle must have been created previously by using
             the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: KBD_GETINTERIMFLAG           0x0072      // Not Supported

APIRET DosDevIOCtl( pfFlags, 0L, 0x0072, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pfFlags;    /* pointer to variable for flags */
HFILE hDevice;    /* device handle                 */

The KBD_GETINTERIMFLAG function retrieves interim character flags.

Parameter  Description
----------------------------------------------------------------------------

pfFlags    Points to the variable that receives interim flags. If the
           variable is CONVERSION_REQUEST, the program requested conversion.
           If it is INTERIM_CHAR, the interim console flag is set.

hDevice    Identifies the keyboard that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: KBD_GETKEYBDTYPE             0x0077      // Supported

APIRET DosDevIOCtl( pbType, 0L, 0x0077, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbType;     /* pointer to structure for keyboard type */
HFILE hDevice;    /* device handle                          */

The KBD_GETKEYBDTYPE function retrieves information about the type of
keyboard being used.

Parameter  Description
----------------------------------------------------------------------------

pbType     Points to the KBDTYPE structure that receives the keyboard type.

hDevice    Identifies the keyboard that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: KBD_GETSESMGRHOTKEY          0x0076      // Not Supported

APIRET DosDevIOCtl( pbHotKeyBuf, pcHotKeys, 0x0076, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbHotKeyBuf;    /* pointer to structure for hot-key information */
PUSHORT pcHotKeys;    /* pointer to variable for hot-key count        */
HFILE hDevice;        /* device handle                                */

The KBD_GETSESMGRHOTKEY function retrieves the hot-key information
structures for the currently defined hot keys.

Parameter    Description
----------------------------------------------------------------------------

pbHotKeyBuf  Points to the HOTKEY structure that receives hot-key
             information structures. The buffer must be at least as large as
             the number of structures requested.

pcHotKeys    Points to the variable that specifies the number of hot-key
             information structures to retrieve. If this variable is
             HOTKEY_MAX_COUNT, the function copies a value to the variable
             that specifies the maximum number of hot keys the keyboard
             device driver can support. If this variable is
             HOTKEY_CURRENT_COUNT, the function copies a value to this
             variable that specifies the actual number of hot keys currently
             supported. The function also copies the hot-key information to
             the buffer pointed to by the pbHotKeyBuf parameter.

hDevice      Identifies the keyboard that receives the device-control
             function. The handle must have been created previously by using
             the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

If the variable pointed to by pcHotKeys is HOTKEY_MAX_COUNT, the function
returns the number of currently defined hot keys. The program uses this
number to allocate sufficient space to retrieve the actual hot-key
information (retrieved by setting the variable to HOTKEY_CURRENT_COUNT).

Programs should retrieve the number of hot keys first, allocate sufficient
space for the buffer pointed to by the pbHotKeyBuf parameter, then retrieve
the hot keys.

                                      o

Topic: KBD_GETSHIFTSTATE            0x0073      // Supported

APIRET DosDevIOCtl( pbShiftState, 0L, 0x0073, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbShiftState;    /* pointer to structure for shift state */
HFILE hDevice;         /* device handle                        */

The KBD_GETSHIFTSTATE function retrieves the shift state of the default
keyboard of the current screen group. The shift state identifies whether the
SHIFT, CTRL, ALT, INS, and SYSREQ keys are up or down and whether the SCROLL
LOCK, NUMLOCK, CAPSLOCK, and INSERT modes are on.

Parameter     Description
----------------------------------------------------------------------------

pbShiftState  Points to the SHIFTSTATE structure that receives the shift
              state.

hDevice       Identifies the keyboard that receives the device-control
              function. The handle must have been created previously by
              using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The shift state is set by incoming keystrokes. It can also be set by using
the KBD_SETSHIFTSTATE function (0x0004, 0x0053).

                                      o

Topic: KBD_PEEKCHAR                 0x0075      // Not Supported

APIRET DosDevIOCtl( pkkiBuffer, pusStatus, 0x0075, KBD_IOCTL_CATEGORY, hDevice )
PKBDKEYINFO pkkiBuffer;    /* pointer to structure for keystroke */
PUSHORT pusStatus;         /* pointer to variable for status     */
HFILE hDevice;             /* device handle                      */

The KBD_PEEKCHAR function retrieves one character data record from the head
of the keyboard-input buffer of the screen group of the active process. The
character data record is not removed from the keyboard-input buffer.

Parameter   Description
----------------------------------------------------------------------------

pkkiBuffer  Points to the KBDKEYINFO structure that contains keyboard
            input.

pusStatus   Points to the variable that receives the keyboard status. It can
            be one or both of the following values:

            Value              Meaning
            ----------------------------------------------------------------
            KBD_DATA_RECEIVED  Character data record is retrieved. If not
                               set, no character data was retrieved.

            KBD_DATA_BINARY    Input mode is binary. If not set, input mode
                               is ASCII.

hDevice     Identifies the keyboard that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

If the shift-reporting input mode is enabled, the keystroke information
retrieved may specify only a shift-state change and no character input.

                                      o

Topic: KBD_READCHAR                 0x0074      // Not Supported

APIRET DosDevIOCtl( pkkiBuffer, pcRecords, 0x0074, KBD_IOCTL_CATEGORY, hDevice )
PKBDKEYINFO pkkiBuffer;    /* pointer to structure for keystrokes     */
PUSHORT pcRecords;         /* pointer to variable for record count    */
HFILE hDevice;             /* device handle                           */

The KBD_READCHAR function retrieves one or more character data records from
the keyboard-input buffer for the screen group of the active process.

Parameter   Description
----------------------------------------------------------------------------

pkkiBuffer  Points to the structure that receives the character data
            records. The structure must be at least as large as the size of
            an individual record multiplied by the requested number of
            records to be read.

pcRecords   Points to the variable that contains the number of records to be
            read. When the function returns, it copies the actual number of
            records retrieved to the variable.

hDevice     Identifies the keyboard that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

This function copies the records to the buffer pointed to by the pkkiBuffer
parameter. The variable pointed to by the pcRecords parameter specifies the
number of records to copy. The function can copy up to 16 characters.

If the variable pointed to by pcRecords is KBD_READ_WAIT, the function waits
for the requested number of keystrokes; it blocks the calling process until
all records have been read. If the variable is KBD_READ_NOWAIT, the function
retrieves any available records (up to the specified number) and returns
immediately. When the function returns, it copies the actual number of
records retrieved to the variable. It sets the sign bit to 0 if the input
mode is ASCII; it sets the sign bit to 1 (0x8000) if the input mode is
binary.

                                      o

Topic: KBD_SETFGNDSCREENGRP         0x0055      // Not Supported

APIRET DosDevIOCtl( 0L, pusScreenGrp, 0x0055, KBD_IOCTL_CATEGORY, hDevice )
PUSHORT pusScreenGrp;    /* pointer to structure with screen group */
HFILE hDevice;           /* device handle                          */

The KBD_SETFGNDSCREENGRP function sets the new foreground screen group. When
the keyboard switches to the new screen group, it switches to the shift
state, input buffer, and monitor chain defined for that screen group.

This function is reserved for the session manager.

Parameter     Description
----------------------------------------------------------------------------

pusScreenGrp  Points to the SCREENGROUP structure that contains the
              screen-group identifier of the new foreground screen group.

hDevice       Identifies the keyboard that receives the device-control
              function. The handle must have been created previously by
              using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: KBD_SETFOCUS                 0x0057      // Not Supported

APIRET DosDevIOCtl( 0L, phkbd, 0x0057, KBD_IOCTL_CATEGORY, hDevice )
PHKBD phkbd;      /* pointer to logical keyboard handle */
HFILE hDevice;    /* device handle                      */

The KBD_SETFOCUS function sets the keyboard focus to the specified logical
keyboard.

Parameter  Description
----------------------------------------------------------------------------

phkbd      Points to the logical keyboard handle. The handle must have been
           created previously by using the KbdOpen function.

hDevice    Identifies the keyboard that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: KBD_SETINPUTMODE             0x0051      // Supported, mostly

APIRET DosDevIOCtl( 0L, pbInputMode, 0x0051, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbInputMode;    /* pointer to variable with input mode */
HFILE hDevice;        /* device handle                       */

The KBD_SETINPUTMODE function sets the input and shift-report modes for the
keyboard device driver. The input mode defines whether the following input
keys are processed as keystrokes or as commands: CTRL+C, CTRL+BREAK, CTRL+S,
CTRL+P, SCROLL LOCK, PRTSC.

The shift-report mode defines whether the shift keys are processed as shift
keys or as keystrokes.

Parameter    Description
----------------------------------------------------------------------------

pbInputMode  Points to the variable that contains the input mode for the
             keyboard. If the variable is ASCII_MODE, the input mode is
             ASCII. If the variable is BINARY_MODE, the input mode is
             binary. If these values are combined with SHIFT_REPORT_MODE,
             the function enables the shift-report mode; otherwise, the
             shift-report mode is disabled.

hDevice      Identifies the keyboard that receives the device-control
             function. The handle must have been created previously by using
             the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The default input mode is ASCII. The keyboard device driver maintains an
input mode for each screen group.

                                      o

Topic: KBD_SETINTERIMFLAG           0x0052      // Not Supported

APIRET DosDevIOCtl( 0L, pfFlags, 0x0052, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pfFlags;    /* pointer to variable with flags */
HFILE hDevice;    /* device handle                  */

The KBD_SETINTERIMFLAG function sets the interim character flags.

Parameter  Description
----------------------------------------------------------------------------

pfFlags    Points to the variable that contains the interim flags. If the
           variable is 0x0020, the program requested conversion. If the
           variable is 0x0080, the interim character flag is set.

hDevice    Identifies the keyboard that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The keyboard device driver maintains the interim character flags for each
screen group and passes the interim character flags (with each character
data record) to the keyboard monitors. The interim character flags set by
this function are not the same as the interim character flags in a character
data record.

                                      o

Topic: KBD_SETKCB                   0x0058      // Not Supported

APIRET DosDevIOCtl( 0L, phKbd, 0x0058, KBD_IOCTL_CATEGORY, hDevice )
PHKBD phKbd;      /* logical-keyboard handle */
HFILE hDevice;    /* device handle           */

The KBD_SETKCB function binds the specified logical keyboard (KCB) to the
physical keyboard for this session.

Parameter  Description
----------------------------------------------------------------------------

phKbd      Points to the handle that identifies the logical keyboard.

hDevice    Identifies the keyboard that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: KBD_SETNLS                   0x005C      // Not Supported

APIRET DosDevIOCtl( 0L, pbCodePage, 0x005C, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbCodePage;    /* pointer to structure with code-page info */
HFILE hDevice;       /* device handle                            */

The KBD_SETNLS function installs one of two possible code pages into the
device driver and updates entry number one or number two of the code-page
control block. Entry zero is the device-driver resident code page.

Parameter   Description
----------------------------------------------------------------------------

pbCodePage  Points to the CODEPAGEINFO structure that specifies the
            translation table and code page to be set.

hDevice     Identifies the keyboard that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

This function is similar to KBD_SETTRANSTABLE (0x0004,0x0050) except it
updates different entries in the code-page control block.

                                      o

Topic: KBD_SETSESMGRHOTKEY          0x0056      // Not Supported

APIRET DosDevIOCtl( 0L, pbHotKey, 0x0056, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbHotKey;    /* pointer to structure with hot key */
HFILE hDevice;     /* device handle                     */

The KBD_SETSESMGRHOTKEY function sets the session-manager hot keys. A new
hot key applies to all screen groups. The session manager can define up to
16 hot keys.

Parameter  Description
----------------------------------------------------------------------------

pbHotKey   Points to the HOTKEY structure that contains the hot-key
           information.

hDevice    Identifies the keyboard that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The KBD_SETSESMGRHOTKEY function is successful only if it is performed by
the process that initially called the KBD_SETFGNDSCREENGRP function (0x0004,
0x0055).

A hot key can be specified as a combination of shift flags and scan codes,
including key combinations such as ALT+ESC. The system detects the hot key
when the specified scan code is received. If a hot key has already been
defined for a given hot-key identifier, specifying the identifier again
replaces the previous definition.

                                      o

Topic: KBD_SETSHIFTSTATE            0x0053      // Supported

APIRET DosDevIOCtl( 0L, pbShiftState, 0x0053, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbShiftState;    /* pointer to structure with shift state */
HFILE hDevice;         /* device handle                         */

The KBD_SETSHIFTSTATE function sets the shift state for the default keyboard
in the current screen group. The shift state identifies whether the SHIFT,
CONTROL, ALT, INSERT, and SYSREQ keys are up or down and whether the SCROLL
LOCK, NUMLOCK, CAPSLOCK, and INSERT modes are on.

Parameter     Description
----------------------------------------------------------------------------

pbShiftState  Points to the SHIFTSTATE structure that contains the shift
              state.

hDevice       Identifies the keyboard that receives the device-control
              function. The handle must have been created previously by
              using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The system puts the shift state into the character data record built for
each incoming keystroke; the shift state then can be used to interpret the
meaning of keystrokes. The function sets the shift state to the specified
state regardless of the state of the actual keys. The shift remains as set
until the user presses or releases the corresponding key.

The keyboard device driver maintains a shift state for each screen group.

                                      o

Topic: KBD_SETTRANSTABLE            0x0050      // Not Supported

APIRET DosDevIOCtl( 0L, pbTransTable, 0x0050, KBD_IOCTL_CATEGORY, hDevice )
PBYTE pbTransTable;    /* pointer to translation table */
HFILE hDevice;         /* device handle                */

The KBD_SETTRANSTABLE function passes a new translation table to the
keyboard translation function. The new table, which overlays the current
table, translates subsequent keystrokes.

Parameter     Description
----------------------------------------------------------------------------

pbTransTable  Points to the translation table.

hDevice       Identifies the keyboard that receives the device-control
              function. The handle must have been created previously by
              using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The default translation table is United States English.

                                      o

Topic: KBD_SETTYPAMATICRATE         0x0054      // Supported

APIRET DosDevIOCtl( 0L, pusRateDelay, 0x0054, KBD_IOCTL_CATEGORY, hDevice )
PUSHORT pusRateDelay;    /* structure with typamatic rate and delay */
HFILE hDevice;           /* device handle                           */

The KBD_SETTYPAMATICRATE function sets the keyboard typamatic rate and
delay.

Parameter     Description
----------------------------------------------------------------------------

pusRateDelay  Points to the RATEDELAY structure that contains the typamatic
              rate and delay.

hDevice       Identifies the keyboard that receives the device-control
              function. The handle must have been created previously by
              using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: KBD_XLATESCAN                0x0079      // Not Supported

APIRET DosDevIOCtl( pkbxl, pidCodePage, 0x0079, KBD_IOCTL_CATEGORY, hDevice )
PKBDXLATE pkbxl;      /* pointer to structure for scan code   */
PBYTE pidCodePage;    /* pointer to code page for translation */
HFILE hDevice;        /* device handle                        */

The KBD_XLATESCAN function translates a scan code in a character data record
to an ASCII character.

Parameter    Description
----------------------------------------------------------------------------

pkbxl        Points to the KBDTRANS structure that contains the scan code to
             translate. It also receives the character value when the
             function returns.
pidCodePage  Points to a code-page identifier that specifies which code page
             to use for the translation. The code-page identifier can be one
             of the following values:

             Number  Code page
             ---------------------------------------------------------------
             437     United States

             850     Multilingual

             860     Portuguese

             863     French-Canadian

             865     Nordic

hDevice      Identifies the keyboard that receives the device-control
             function. The handle must have been created previously by using
             the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

You may specify a code page to use for translation. Otherwise, the code page
of the active keyboard is used. On entry, the KBDTRANS structure specifies
the code page to use for translation.

                                      o

Topic: MON_IOCTL_CATEGORY           0x000A      // Not Supported

Topic: MON_REGISTERMONITOR          0x0040      // Not Supported

APIRET DosDevIOCtl( pusInfo, pbCommand, 0x0040, MON_IOCTL_CATEGORY, hDevice )
PUSHORT pusInfo;    /* pointer to structure with monitor-register info */
PBYTE pbCommand;    /* pointer to command                              */
HFILE hDevice;      /* device handle                                   */

The MON_REGISTERMONITOR function registers a monitor.

Parameter  Description
----------------------------------------------------------------------------

pusInfo    Points to the MONITORPOSITION structure that contains the
           monitor-registration information.

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the device that receives the device-control function.
           The handle must have been created previously by using the
           DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_IOCTL_CATEGORY           0x0007      // Not Supported

Topic: MOU_ALLOWPTRDRAW             0x0050      // Not Supported

APIRET DosDevIOCtl( 0L, 0L, 0x0050, MOU_IOCTL_CATEGORY, hDevice )
HFILE hDevice;    /* device handle */

The MOU_ALLOWPTRDRAW function notifies the mouse device driver that the
screen group has been switched and that the pointer can now be drawn.

Parameter  Description
----------------------------------------------------------------------------

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_DRAWPTR                  0x0057      // Not Supported

APIRET DosDevIOCtl( 0L, 0L, 0x0057, MOU_IOCTL_CATEGORY, hDevice )
HFILE hDevice;    /* device handle */

The MOU_DRAWPTR function removes the current exclusion rectangle, allowing
the pointer to be drawn anywhere on the screen. If an exclusion rectangle
has been declared for the screen group, that rectangle is released and the
pointer position is checked. If the pointer was in the released rectangle,
it is drawn. If the pointer was not in the released rectangle, the
pointer-draw operation occurs.

Parameter  Description
----------------------------------------------------------------------------

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_DISPLAYMODECHANGE        0x005D      // Not Supported

APIRET DosDevIOCtl( 0L, 0L, 0x005D, MOU_IOCTL_CATEGORY, hDevice )
HFILE hDevice;    /* device handle */

The MOU_DISPLAYMODECHANGE function notifies the mouse device driver that a
display-mode change is complete.

Parameter  Description
----------------------------------------------------------------------------

hDevice    Identifies the pointing device that receives the device-control
           function. This handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful. Otherwise, it is an
error value.

Comments

The MOU_DISPLAYMODECHANGE function notifies the mouse that a mode switch is
complete and that drawing is allowed. The pointer is redrawn if it was
hidden when the mode switch began.

                                      o

Topic: MOU_GETBUTTONCOUNT           0x0060      // Not Supported

APIRET DosDevIOCtl( pusCount, 0L, 0x0060, MOU_IOCTL_CATEGORY, hDevice )
PUSHORT pusCount;    /* pointer to variable for button count */
HFILE hDevice;       /* device handle                        */

The MOU_GETBUTTONCOUNT function retrieves a count of the number of mouse
buttons.

Parameter  Description
----------------------------------------------------------------------------

pusCount   Points to the variable that receives the count mouse buttons.

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_GETEVENTMASK             0x0065      // Not Supported

APIRET DosDevIOCtl( pfEvents, 0L, 0x0065, MOU_IOCTL_CATEGORY, hDevice )
PUSHORT pfEvents;    /* pointer to variable for event mask */
HFILE hDevice;       /* device handle                      */

The MOU_GETEVENTMASK function retrieves the event mask of the current
pointing device.

Parameter  Description
----------------------------------------------------------------------------

pfEvents   Points to the variable that receives the event mask. This
           variable can be a combination of the following values:

           Value                       Meaning
           -----------------------------------------------------------------
           MOUSE_MOTION                Motion; no buttons pressed.

           MOUSE_MOTION_WITH_BN1_DOWN  Motion with button 1 pressed.

           MOUSE_BN1_DOWN              Button 1 pressed.

           MOUSE_MOTION_WITH_BN2_DOWN  Motion with button 2 pressed.

           MOUSE_BN2_DOWN              Button 2 pressed.

           MOUSE_MOTION_WITH_BN3_DOWN  Motion with button 3 pressed.

           MOUSE_BN3_DOWN              Button 3 pressed.

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_GETHOTKEYBUTTON          0x0069      // Not Supported

APIRET DosDevIOCtl( pfHotKey, 0L, 0x0069, MOU_IOCTL_CATEGORY, hDevice )
PUSHORT pfHotKey;    /* pointer to variable for hot key */
HFILE hDevice;       /* device handle                   */

The MOU_GETHOTKEYBUTTON function retrieves the mouse-button equivalent for
the system hot key.

Parameter  Description
----------------------------------------------------------------------------

pfHotKey   Points to the variable that receives the hot key. This variable
           can be one or more of the following values:

           Value          Meaning
           -----------------------------------------------------------------
           MHK_NO_HOTKEY  No system hot key used.

           MHK_BUTTON1    Button 1 is system hot key.

           MHK_BUTTON2    Button 2 is system hot key.

           MHK_BUTTON3    Button 3 is system hot key.

           If 0x0001 is specified, no system hot-key support is provided. If
           multiple values are given (excluding 0x0001) the system hot key
           requires that the indicated buttons be pressed simultaneously.

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_GETMICKEYCOUNT           0x0061      // Not Supported

APIRET DosDevIOCtl( pcMickeys, 0L, 0x0061, MOU_IOCTL_CATEGORY, hDevice )
PUSHORT pcMickeys;    /* pointer to variable for mickeys */
HFILE hDevice;        /* device handle                   */

The MOU_GETMICKEYCOUNT function retrieves the count of mickeys per
centimeter for a given pointing device.

Parameter  Description
----------------------------------------------------------------------------

pcMickeys  Points to the variable that receives the number of mickeys per
           centimeter. The number can be any value from 0 through 32,767.

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_GETMOUSTATUS             0x0062      // Not Supported

APIRET DosDevIOCtl( pfStatus, 0L, 0x0062, MOU_IOCTL_CATEGORY, hDevice )
PUSHORT pfStatus;    /* pointer to variable for status flags */
HFILE hDevice;       /* device handle                        */

The MOU_GETMOUSTATUS function retrieves the current status flags of the
mouse device driver.

Parameter  Description
----------------------------------------------------------------------------

pfStatus   Points to the variable that receives the status flags. This
           variable can be a combination of the following values:

           Value                   Meaning
           -----------------------------------------------------------------
           MOUSE_QUEUEBUSY         Event queue is busy with I/O.

           MOUSE_BLOCKREAD         Block read is in progress.

           MOUSE_FLUSH             Flush is in progress.

           MOUSE_UNSUPPORTED_MODE  Pointer-draw routine is disabled (device
                                   in unsupported mode).

           MOUSE_DISABLED          Interrupt-level pointer-draw routine is
                                   not called.

           MOUSE_MICKEYS           Mouse data is returned in mickeys (not
                                   pels).

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_GETPTRPOS                0x0067      // Not Supported

APIRET DosDevIOCtl( pplPosition, 0L, 0x0067, MOU_IOCTL_CATEGORY, hDevice )
PPTRLOC pplPosition;    /* pointer to structure for position */
HFILE hDevice;          /* device handle                     */

The MOU_GETPTRPOS function retrieves the position of the current screen's
pointer.

Parameter    Description
----------------------------------------------------------------------------

pplPosition  Points to the PTRLOC structure that receives the new pointer
             position.

hDevice      Identifies the pointing device that receives the device-control
             function. The handle must have been created previously by using
             the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The coordinate values depend on the display mode. If the display is in text
mode, character-position values are used. If the display is in graphics
mode, pel values are used.

                                      o

Topic: MOU_GETPTRSHAPE              0x0068      // Not Supported

APIRET DosDevIOCtl( pbBuffer, ppsShape, 0x0068, MOU_IOCTL_CATEGORY, hDevice )
PBYTE pbBuffer;        /* pointer to buffer for pointer masks        */
PPTRSHAPE ppsShape;    /* pointer to structure for shape information */
HFILE hDevice;         /* device handle                              */

The MOU_GETPTRSHAPE function retrieves the current pointer shape.

Parameter  Description
----------------------------------------------------------------------------

pbBuffer   Points to the buffer that receives the pointer shape. The image
           format depends on the mode of the display. For currently
           supported modes, the buffer always consists of the AND image data
           followed by the XOR image data. The buffer always describes one
           display plane.

ppsShape   Points to the PTRSHAPE structure that receives the pointer
           information and shape.

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The function exits in a normal state if the input pointer-image buffer is
large enough to store the pointer image. The current pointer information is
returned in the pointer-data record, and the pointer-image data is copied
into the data-packet buffer.

An "invalid buffer size" error occurs if the input pointer-image buffer is
smaller than the amount of storage necessary for copying the data. The
buffer length returned will be minimum value.

Comments

The parameter values are in the same mode as the current screen-group
display mode. For text mode, these are character values; for graphics mode,
these are pel values.

On input, the only field in the pointer-definition record used by the mouse
device driver is the length of the pointer-image buffer.

                                      o

Topic: MOU_GETQUESTATUS             0x0064      // Not Supported

APIRET DosDevIOCtl( pmqiStatus, 0L, 0x0064, MOU_IOCTL_CATEGORY, hDevice )
PMOUQUEINFO pmqiStatus;    /* pointer to structure for queue status */
HFILE hDevice;             /* device handle                         */

The MOU_GETQUESTATUS function retrieves the number of elements in the event
queue and the maximum number of elements allowed in an event queue.

Parameter   Description
----------------------------------------------------------------------------

pmqiStatus  Points to the MOUQUEINFO structure that receives the queue
            status.

hDevice     Identifies the pointing device that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_GETSCALEFACTORS          0x0066      // Not Supported

APIRET DosDevIOCtl( psfFactors, 0L, 0x0066, MOU_IOCTL_CATEGORY, hDevice )
PSCALEFACT psfFactors;    /* pointer to structure for scaling factors */
HFILE hDevice;            /* device handle                            */

The MOU_GETSCALEFACTORS function retrieves the scaling factors of the
current pointing device. Scaling factors are the ratio values that determine
how much relative movement is necessary before the mouse device driver
reports a pointing-device event. In graphics mode, this ratio is given in
mickeys-per-pel. In text mode, this ratio is given in mickeys-per-character.
The default values are one mickey-per-row and one mickey-per-column.

Parameter   Description
----------------------------------------------------------------------------

psfFactors  Points to the SCALEFACT structure that receives the scaling
            factors.

hDevice     Identifies the pointing device that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_READEVENTQUE             0x0063      // Not Supported

APIRET DosDevIOCtl( pmeiEvent, pfWait, 0x0063, MOU_IOCTL_CATEGORY, hDevice )
PMOUEVENTINFO pmeiEvent;    /* pointer to structure for event information */
PUSHORT pfWait;             /* pointer to wait/no-wait flag               */
HFILE hDevice;              /* device handle                              */

The MOU_READEVENTQUE function reads the event queue for the pointing
device.

Parameter  Description
----------------------------------------------------------------------------

pmeiEvent  Points to the MOUEVENTINFO structure that receives event-queue
           information.

pfWait     Points to the variable that specifies how to read from the queue
           if no event is available. If the variable is WAIT, the function
           returns immediately without an event. If the variable is NOWAIT,
           the function waits until an event is available.

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_REMOVEPTR                0x0058      // Not Supported

APIRET DosDevIOCtl( 0L, pnprBuffer, 0x0058, MOU_IOCTL_CATEGORY, hDevice )
PNOPTRRECT pnprBuffer;    /* points to structure with exclusion rectangle */
HFILE hDevice;            /* device handle                                */

The MOU_REMOVEPTR function specifies the exclusion rectangle to be used by
the device driver. The exclusion rectangle specifies an area on the screen
where the pointer-draw routine cannot draw the pointer.

Parameter   Description
----------------------------------------------------------------------------

pnprBuffer  Points to the NOPTRRECT structure that contains the dimensions
            of the exclusion rectangle.

hDevice     Identifies the pointing device that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The pointer is not drawn in the exclusion rectangle until a different area
is specified by another call of this function.

If the exclusion rectangle is defined as the entire screen, pointer-draw
operations are disabled for the entire screen group.

                                      o

Topic: MOU_SCREENSWITCH             0x0052      // Not Supported

APIRET DosDevIOCtl( 0L, pbNotify, 0x0052, MOU_IOCTL_CATEGORY, hDevice )
PBYTE pbNotify;    /* pointer to structure with screen group */
HFILE hDevice;     /* device handle                          */

The MOU_SCREENSWITCH function notifies the mouse device driver that the
screen group is about to be switched, and then sets a system pointer-draw
enable/disable flag. Any pointer drawing is locked until the flag is cleared
by using the MOU_ALLOWPTRDRAW function (0x0007, 0x0050).

Parameter  Description
----------------------------------------------------------------------------

pbNotify   Points to the SCREENGROUP structure that contains the
           notification type and screen-group identifier.

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_SETEVENTMASK             0x0054      // Not Supported

APIRET DosDevIOCtl( 0L, pfEvent, 0x0054, MOU_IOCTL_CATEGORY, hDevice )
PUSHORT pfEvent;    /* pointer to variable for event mask */
HFILE hDevice;      /* device handle                      */

The MOU_SETEVENTMASK function sets the event mask of the pointing device.

Parameter  Description
----------------------------------------------------------------------------

pfEvent    Points to the variable that contains the event mask. This
           variable can be a combination of the following values:

           Value                       Meaning
           -----------------------------------------------------------------
           MOUSE_MOTION                Motion; no buttons pressed.

           MOUSE_MOTION_WITH_BN1_DOWN  Motion with button 1 pressed.

           MOUSE_BN1_DOWN              Button 1 pressed.

           MOUSE_MOTION_WITH_BN2_DOWN  Motion with button 2 pressed.

           MOUSE_BN2_DOWN              Button 2 pressed.

           MOUSE_MOTION_WITH_BN3_DOWN  Motion with button 3 pressed.

           MOUSE_BN3_DOWN              Button 3 pressed.

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_SETHOTKEYBUTTON          0x0055      // Not Supported

APIRET DosDevIOCtl( 0L, pfHotKey, 0x0055, MOU_IOCTL_CATEGORY, hDevice )
PUSHORT pfHotKey;    /* pointer to variable with hot key */
HFILE hDevice;       /* device handle                    */

The MOU_SETHOTKEYBUTTON function sets the mouse-button equivalent for the
system hot key.

Parameter  Description
----------------------------------------------------------------------------

pfHotKey   Points to the variable that specifies the hot key. This variable
           can be a combination of the following values:

           Value          Meaning
           -----------------------------------------------------------------
           MHK_NO_HOTKEY  No system hot key used.

           MHK_BUTTON1    Button 1 is system hot key.

           MHK_BUTTON2    Button 2 is system hot key.

           MHK_BUTTON3    Button 3 is system hot key.

           If 0x0001 is specified, no system hot-key support is provided. If
           multiple values are given (excluding 0x0001), the system hot key
           requires that the indicated buttons be pressed simultaneously.

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

This function can be called only by the process that initially issues it and
should be used only by the command shell.

                                      o

Topic: MOU_SETMOUSTATUS             0x005C      // Not Supported

APIRET DosDevIOCtl( 0L, pfStatus, 0x005C, MOU_IOCTL_CATEGORY, hDevice )
PUSHORT pfStatus;    /* pointer to variable with status */
HFILE hDevice;       /* device handle                   */

The MOU_SETMOUSTATUS function sets a subset of the current mouse
device-driver status flags.

Parameter  Description
----------------------------------------------------------------------------

pfStatus   Points to the variable that contains the status flags for the
           pointing device. If the variable contains MOUSE_DISABLED, the
           interrupt-level pointer-draw routine is not called. If the
           variable contains MOUSE_MICKEYS, mouse data is returned in
           mickeys (not pels).

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_SETPROTDRAWADDRESS       0x005A      // Not Supported

APIRET DosDevIOCtl( pbDrawData, pbFunction, 0x005A, MOU_IOCTL_CATEGORY, hDevice )
PBYTE pbDrawData;    /* pointer to drawing data                    */
PBYTE pbFunction;    /* pointer to structure with drawing function */
HFILE hDevice;       /* device handle                              */

The MOU_SETPROTDRAWADDRESS function notifies the mouse device driver of the
address of a protected-mode pointer-draw function. This function is valid
for protected mode only.

Parameter   Description
----------------------------------------------------------------------------

pbDrawData  Points to the PTRDRAWDATA structure.

pbFunction  Points to the PTRDRAWFUNCTION structure that contains the
            address of the pointer-draw function.

hDevice     Identifies the pointing device that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The pointer-draw routine is an installed, pseudo-character device driver.
The mouse handler must do the following:

o  Open the pointer-draw device driver.

o  Query the pointer-draw device driver for the address of its entry point.

o  Pass the resulting address of the pointer-draw entry point to the mouse
   device driver that uses this function.

                                      o

Topic: MOU_SETPTRPOS                0x0059      // Not Supported

APIRET DosDevIOCtl( 0L, pplPosition, 0x0059, MOU_IOCTL_CATEGORY, hDevice )
PPTRLOC pplPosition;    /* pointer to structure with pointer position */
HFILE hDevice;          /* device handle                              */

The MOU_SETPTRPOS function sets a new screen position for the pointer
image.

Parameter    Description
----------------------------------------------------------------------------

pplPosition  Points to the PTRLOC structure that contains the new position
             for the pointer.

hDevice      Identifies the pointing device that receives the device-control
             function. The handle must have been created previously by using
             the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The coordinate values depend on the display mode. If the display is in text
mode, character-position values are used. If the display is in graphics
mode, pel values are used.

This function has no effect on the current exclusion-rectangle definitions.
If a pointer image is already defined for the screen group, it is replaced
by the new pointer image.

If the pointer image is directed into an existing exclusion rectangle, it
remains hidden (invisible) until sufficient movement places the pointer
outside the exclusion rectangle or until the exclusion rectangle is
released.

                                      o

Topic: MOU_SETPTRSHAPE              0x0056      // Not Supported

APIRET DosDevIOCtl( pbBuffer, ppsShape, 0x0056, MOU_IOCTL_CATEGORY, hDevice )
PBYTE pbBuffer;        /* pointer to structure with shape masks       */
PPTRSHAPE ppsShape;    /* pointer to structure with shape information */
HFILE hDevice;         /* device handle                               */

The MOU_SETPTRSHAPE function sets the pointer shape.

Parameter  Description
----------------------------------------------------------------------------

pbBuffer   Points to the buffer that contains the pointer image. The image
           format depends on the mode of the display. For currently
           supported modes, the buffer always consists of the AND image
           data, followed by the XOR image data. The buffer always describes
           one display plane.

ppsShape   Points to the PTRSHAPE structure that receives the pointer
           information and shape.

hDevice    Identifies the pointing device that receives the device-control
           function. The handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The parameter values must be in the same mode as the current screen-group
display mode. For text mode, these must be character values; for graphics
mode, these must be pel values.

                                      o

Topic: MOU_SETREALDRAWADDRESS       0x005B      // Not Supported

APIRET DosDevIOCtl( pvConfig, pbFunction, 0x005B, MOU_IOCTL_CATEGORY, hDevice )
PVOID pvConfig;      /* pointer to configuration structure */
PBYTE pbFunction;    /* pointer to structure with function */
HFILE hDevice;       /* device handle                      */

The MOU_SETREALDRAWADDRESS function notifies the real-mode mouse device
driver of the entry point of a real-mode pointer-draw routine. This function
is intended for use by Session Manager at the end of system initialization
and is valid for real mode only.

Parameter   Description
----------------------------------------------------------------------------

pvConfig    Points to the VIOCONFIGINFO structure that contains information
            about configuration of the default display.

pbFunction  Points to the PTRDRAWFUNCTION structure that contains the
            address of the pointer-draw function.

hDevice     Identifies the pointing device that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_SETSCALEFACTORS          0x0053      // Not Supported

APIRET DosDevIOCtl( 0L, psfFactors, 0x0053, MOU_IOCTL_CATEGORY, hDevice )
PSCALEFACT psfFactors;    /* pointer to structure with factors */
HFILE hDevice;            /* device handle                     */

The MOU_SETSCALEFACTORS function reassigns the scaling factors of the
current pointing device. Scaling factors are ratio values that determine how
much relative movement is necessary before the mouse device driver reports a
pointing-device event. In graphics mode, the ratio is given in
mickeys-per-pel. In text mode, the ratio is given in mickeys-per-character.
The default ratio values are one mickey-per-row and one mickey-per-column.

Parameter   Description
----------------------------------------------------------------------------

psfFactors  Points to the SCALEFACT structure that contains the scale
            factors.

hDevice     Identifies the pointing device that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: MOU_UPDATEDISPLAYMODE        0x0051      // Not Supported

APIRET DosDevIOCtl( pvConfigInfo, pviomi, 0x0051, MOU_IOCTL_CATEGORY, hDevice )
PVOID pvConfigInfo;     /* pointer to structure with configuration info */
PVIOMODEINFO pviomi;    /* pointer to structure with screen mode        */
HFILE hDevice;          /* device handle                                */

The MOU_UPDATEDISPLAYMODE function notifies the mouse device driver that the
display mode has been modified.

Parameter     Description
----------------------------------------------------------------------------

pvConfigInfo  Points to the VIOCONFIGINFO structure that contains the
              current display-configuration information.

pviomi        Points to the VIOMODEINFO structure that contains the
              display-mode information.

hDevice       Identifies the pointing device that receives the
              device-control function. This handle must have been created
              previously by using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

When the video I/O subsystem or registered video I/O subsystem sets the
display mode, it must notify the mouse device driver prior to switching
display modes, in order to synchronize the mouse device driver's functions
that update the pointer.

                                      o

Topic: MOU_VER                      0x006A      // Supported (?????)

APIRET DosDevIOCtl( pusVersion, 0L, 0x006A, MOU_IOCTL_CATEGORY, hDevice )
PUSHORT pusVersion;    /* pointer to version number */
HFILE hDevice;         /* device handle             */

The MOU_VER function returns the version number of the mouse driver.

Parameter   Description
----------------------------------------------------------------------------

pusVersion  Points to a data area in which the version number of the mouse
            driver is returned.

hDevice     Identifies the pointing device that receives the device-control
            function. This handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful. Otherwise, it is an
error value.

Comments

The MOU_VER function returns 0x0001 as the version number of the mouse
driver to indicate that the following features are supported. These features
are new for MS OS/2, version 1.2.

Function                Change
----------------------------------------------------------------------------
MOU_DISPLAYMODECHANGE   New IOCtl function.

MOU_SETPROTDRAWADDRESS  New pbDrawData parameter.

MOU_SETREALDRAWADDRESS  New pvConfig parameter.

MOU_UPDATEDISPLAYMODE   New pvConfigInfo parameter.

MOU_UPDATEDISPLAYMODE   Size of VIOMODEINFO structure increased from 12 to
                        34 bytes.

MOU_VER                 New IOCtl function.

The MOU_VER function should be used to determine the version number of the
mouse device driver before any of these features are used, in order to
maintain compatibility with earlier versions of MS OS/2.

                                      o

Topic: PDSK_IOCTL_CATEGORY          0x0009      // Supported

Topic: PDSK_GETPHYSDEVICEPARAMS     0x0063      // Supported (?????)

APIRET DosDevIOCtl( pbBlock, pbCommand, 0x0063, PDSK_IOCTL_CATEGORY, hDevice )
PBYTE pbBlock;      /* pointer to structure for device parameters */
PBYTE pbCommand;    /* pointer to variable with command           */
HFILE hDevice;      /* device handle                              */

The PDSK_GETPHYSDEVICEPARAMS function retrieves the device parameters for a
physical device. The retrieved parameters apply to the entire physical
disk.

Parameter  Description
----------------------------------------------------------------------------

pbBlock    Points to the DEVICEPARAMETERBLOCK structure that receives the
           device parameters.

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the physical device that receives the device-control
           function. The handle must have been created previously by using
           the DosPhysicalDisk function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PDSK_LOCKPHYSDRIVE           0x0000      // Supported (?????)

APIRET DosDevIOCtl( 0L, pbCommand, 0x0000, PDSK_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to variable with command */
HFILE hDevice;      /* device handle                    */

The PDSK_LOCKPHYSDRIVE function locks the physical drive and any of its
associated logical units.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the disk-drive device that receives the device-control
           function. The handle must have been created previously by using
           the DosPhysicalDisk function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PDSK_READPHYSTRACK           0x0064      // Supported

APIRET DosDevIOCtl( pbBuffer, pbCommand, 0x0064, PDSK_IOCTL_CATEGORY, hDevice )
PBYTE pbBuffer;     /* pointer to structure for data     */
PBYTE pbCommand;    /* pointer to structure with command */
HFILE hDevice;      /* device handle                     */

The PDSK_READPHYSTRACK function reads from a physical track on the device
specified in the request.

Parameter  Description
----------------------------------------------------------------------------

pbBuffer   Points to the buffer that receives the data to be read.

pbCommand  Points to the TRACKLAYOUT structure that contains information
           about the read operation.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosPhysicalDisk function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

This function is similar to the DSK_READTRACK function (0x0008, 0x0064)
except that I/O is offset from the beginning of the physical drive instead
of from the unit number.

The track table passed in the function determines the sector number, which
is passed to the disk controller. When the sectors are odd-numbered or
nonconsecutive, the request is broken into an appropriate number of
single-sector operations, and one sector at a time is read.

The device driver will not correctly read sectors of sizes other than 512
bytes if doing so would generate a direct-memory-access (DMA) violation
error.

                                      o

Topic: PDSK_UNLOCKPHYSDRIVE         0x0001      // Supported (?????)

APIRET DosDevIOCtl( 0L, pbCommand, 0x0001, PDSK_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to variable with command */
HFILE hDevice;      /* device handle                    */

The PDSK_UNLOCKPHYSDRIVE function unlocks the physical disk drive and any of
its associated logical units and also affects the logical units on the
physical disk drive.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosPhysicalDisk function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PDSK_VERIFYPHYSTRACK         0x0065      // Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x0065, PDSK_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* pointer to structure with verification data */
HFILE hDevice;      /* device handle                               */

The PDSK_VERIFYPHYSTRACK function verifies I/O on a physical track on the
device specified in the request.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the TRACKLAYOUT structure that contains information
           about the verify operation.

hDevice    Identifies the physical device that receives the device-control
           function. The handle must have been created previously by using
           the DosPhysicalDisk function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

This function is similar to the DSK_VERIFYTRACK function (0x0008, 0x0065)
except that I/O is offset from the beginning of the physical drive instead
of from the unit number.

The track-layout table passed in the function determines the sector number,
which is passed to the disk controller. When the sectors are odd-numbered or
nonconsecutive, the request is broken into an appropriate number of
single-sector operations, and one sector at a time is verified.

                                      o

Topic: PDSK_WRITEPHYSTRACK          0x0044      // Supported

APIRET DosDevIOCtl( pbBuffer, pbCommand, 0x0044, PDSK_IOCTL_CATEGORY, hDevice )
PBYTE pbBuffer;     /* pointer to buffer with data       */
PBYTE pbCommand;    /* pointer to structure with command */
HFILE hDevice;      /* device handle                     */

The PDSK_WRITEPHYSTRACK function writes to a physical track on the device
specified in the request.

Parameter  Description
----------------------------------------------------------------------------

pbBuffer   Points to the buffer that contains the data to be written.

pbCommand  Points to the TRACKLAYOUT structure that contains information
           about the write operation.

hDevice    Identifies the disk drive that receives the device-control
           function. The handle must have been created previously by using
           the DosPhysicalDisk function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

This function is similar to the DSK_WRITETRACK function (0x0008, 0x0044)
except that I/O is offset from the beginning of the physical drive instead
of from the unit number.

The track-layout table passed in this function determines the sector number,
which is passed to the disk controller. When the sectors are odd-numbered or
nonconsecutive, the request is broken into an appropriate number of
single-sector operations, and one sector at a time is written.

                                      o

Topic: PRT_IOCTL_CATEGORY           0x0005      // Not Supported

Topic: PRT_ACTIVATEFONT             0x0048      // Not Supported

APIRET DosDevIOCtl( pbFontInfo, pbCommand, 0x0048, PRT_IOCTL_CATEGORY, hDevice )
PBYTE pbFontInfo;    /* pointer to structure for font info */
PBYTE pbCommand;     /* pointer to byte with command info  */
HFILE hDevice;       /* device handle                      */

The PRT_ACTIVATEFONT function activates a font for printing.

Parameter   Description
----------------------------------------------------------------------------

pbFontInfo  Points to a FONTINFO structure that specifies the font to
            activate.

pbCommand   Points to a reserved 8-bit value. The value must be zero.

hDevice     Identifies the printer that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PRT_GETFRAMECTL              0x0062      // Not Supported

APIRET DosDevIOCtl( pbFrameCtl, pbCommand, 0x0062, PRT_IOCTL_CATEGORY, hDevice )
PBYTE pbFrameCtl;    /* pointer to structure for frame settings */
PBYTE pbCommand;     /* pointer to variable with command        */
HFILE hDevice;       /* device handle                           */

The PRT_GETFRAMECTL function retrieves frame-control information for a
printer.

Parameter   Description
----------------------------------------------------------------------------

pbFrameCtl  Points to the FRAME structure that receives the frame-control
            information.

pbCommand   Points to the variable that contains a reserved value. The value
            must be zero.

hDevice     Identifies the printer that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PRT_GETINFINITERETRY         0x0064      // Not Supported

APIRET DosDevIOCtl( pfRetry, pbCommand, 0x0064, PRT_IOCTL_CATEGORY, hDevice )
PBYTE pfRetry;      /* pointer to variable for retry flag */
PBYTE pbCommand;    /* pointer to variable with command   */
HFILE hDevice;      /* device handle                      */

The PRT_GETINFINITERETRY function retrieves an infinite retry setting for a
printer.

Parameter  Description
----------------------------------------------------------------------------

pfRetry    Points to the variable that receives the infinite retry setting.
           The variable is FALSE if infinite retry is disabled or TRUE if
           retry is enabled.

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the printer that receives the device-control function.
           The handle must have been created previously by using the
           DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PRT_GETPRINTERSTATUS         0x0066      // Not Supported

APIRET DosDevIOCtl( pfStatus, pbCommand, 0x0066, PRT_IOCTL_CATEGORY, hDevice )
PBYTE pfStatus;     /* pointer to printer status flag   */
PBYTE pbCommand;    /* pointer to variable with command */
HFILE hDevice;      /* device handle                    */

The PRT_GETPRINTERSTATUS function retrieves the status of a printer.

Parameter  Description
----------------------------------------------------------------------------

pfStatus   Points to the variable that receives the printer status. This
           variable can be a combination of the following values:

           Value                 Meaning
           -----------------------------------------------------------------
           PRINTER_TIMEOUT       Time-out occurred.

           PRINTER_IO_ERROR      I/O error occurred.

           PRINTER_SELECTED      Printer selected.

           PRINTER_OUT_OF_PAPER  Printer out of paper.

           PRINTER_ACKNOWLEDGED  Printer acknowledged.

           PRINTER_NOT_BUSY      Printer not busy.

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the printer that receives the device-control function.
           The handle must have been created previously by using the
           DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PRT_INITPRINTER              0x0046      // Not Supported

APIRET DosDevIOCtl( 0L, pbCommand, 0x0046, PRT_IOCTL_CATEGORY, hDevice )
PBYTE pbCommand;    /* command value */
HFILE hDevice;      /* device handle */

The PRT_INITPRINTER function initializes a printer.

Parameter  Description
----------------------------------------------------------------------------

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the printer that receives the device-control function.
           The handle must have been created previously by using the
           DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PRT_QUERYACTIVEFONT          0x0069      // Not Supported

APIRET DosDevIOCtl( pbFontInfo, pbCommand, 0x0069, PRT_IOCTL_CATEGORY, hDevice )
PBYTE pbFontInfo;    /* pointer to structure for font information */
PBYTE pbCommand;     /* pointer to byte with command information  */
HFILE hDevice;       /* device handle                             */

The PRT_QUERYACTIVEFONT function determines which code page and font are
currently active.

Parameter   Description
----------------------------------------------------------------------------

pbFontInfo  Points to a FONTINFO structure that specifies the active font.

pbCommand   Points to a reserved 8-bit value. The value must be zero.

hDevice     Identifies the printer that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PRT_SETFRAMECTL              0x0042      // Not Supported

APIRET DosDevIOCtl( pbFrameCtl, pbCommand, 0x0042, PRT_IOCTL_CATEGORY, hDevice )
PBYTE pbFrameCtl;    /* pointer to structure with frame settings */
PBYTE pbCommand;     /* pointer to variable with command         */
HFILE hDevice;       /* device handle                            */

The PRT_SETFRAMECTL function sets the frame-control information for a
printer.

Parameter   Description
----------------------------------------------------------------------------

pbFrameCtl  Points to the FRAME structure that contains the frame-control
            information.

pbCommand   Points to the variable that contains a reserved value. The value
            must be zero.

hDevice     Identifies the printer that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PRT_SETINFINITERETRY         0x0044      // Not Supported

APIRET DosDevIOCtl( pfRetry, pbCommand, 0x0044, PRT_IOCTL_CATEGORY, hDevice )
PBYTE pfRetry;      /* pointer to retry flag            */
PBYTE pbCommand;    /* pointer to variable with command */
HFILE hDevice;      /* device handle                    */

The PRT_SETINFINITERETRY function sets infinite retry for a printer.

Parameter  Description
----------------------------------------------------------------------------

pfRetry    Points to the variable that specifies whether to enable infinite
           retry. If the variable is FALSE, the function disables infinite
           retry. If the variable is TRUE, the function enables infinite
           retry.

pbCommand  Points to the variable that contains a reserved value. The value
           must be zero.

hDevice    Identifies the printer that receives the device-control function.
           The handle must have been created previously by using the
           DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PRT_VERIFYFONT               0x006A      // Not Supported

APIRET DosDevIOCtl( pbFontInfo, pbCommand, 0x006A, PRT_IOCTL_CATEGORY, hDevice )
PBYTE pbFontInfo;    /* points to structure for font info */
PBYTE pbCommand;     /* points to byte with command info  */
HFILE hDevice;       /* device handle                     */

The PRT_VERIFYFONT function verifies that a particular code page and font
are available for the specified printer.

Parameter   Description
----------------------------------------------------------------------------

pbFontInfo  Points to the FONTINFO structure that receives information for
            the available font.

pbCommand   Points to a reserved 8-bit value. The value must be zero.

hDevice     Identifies the printer that receives the device-control
            function. The handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

                                      o

Topic: PTR_IOCTL_CATEGORY           0x0003      // Not Supported

Topic: PTR_GETPTRDRAWADDRESS        0x0072      // Not Supported

APIRET DosDevIOCtl( pbFunctionInfo, 0L, 0x0072, PTR_IOCTL_CATEGORY, hDevice )
PBYTE pbFunctionInfo;    /* pointer to structure for function */
HFILE hDevice;           /* device handle                     */

The PTR_GETPTRDRAWADDRESS function retrieves the entry-point address and
other information for the pointer-draw function (the function that draws the
mouse pointer on the screen).

Parameter       Description
----------------------------------------------------------------------------

pbFunctionInfo  Points to PTRDRAWADDRESS structure that receives the
                function information.

hDevice         Identifies the pointing device that receives the
                device-control function. The handle must have been created
                previously by using the DosOpen function.

Return Value

The return value is zero if the function is successful or an error value if
an error occurs.

Comments

The mouse device driver uses the pointer-draw function to update the pointer
image on the screen, and retrieves the address and saves it to use whenever
the pointer moves.

                                      o

Topic: SCR_IOCTL_CATEGORY           0x0003      // Not Supported

Topic: SCR_ALLOCLDT                 0x0070      // Not Supported

APIRET DosDevIOCtl( psel, pvAddrInfo, 0x0070, SCR_IOCTL_CATEGORY, hDevice )
PSEL psel;           /* pointer to LDT selector                */
PVOID pvAddrInfo;    /* pointer to structure with address info */
HFILE hDevice;       /* device handle                          */

The SCR_ALLOCLDT function allocates a logical descriptor table (LDT)
selector for an area of memory.

Parameter   Description
----------------------------------------------------------------------------

psel        Points to the logical descriptor table selector for the memory
            area specified by the LDTADDRINFO structure.

pvAddrInfo  Points to the LDTADDRINFO structure that contains the address
            and size of memory for which a selector is requested.

hDevice     Identifies the screen device that receives the device-control
            function. This handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or the error value
ERROR_I24_INVALID_PARAMETER if an error occurs.

Comments

Read/Write access is granted to data areas completely contained in the
address range 0xA0000 through 0xBFFFF. Read-only access is granted to data
areas outside this range, but inside the range 0x00000 through 0xFFFFF.
Attempts to access any address outside this range results in an error.

                                      o

Topic: SCR_ALLOCLDTOFF              0x0075      // Not Supported

APIRET DosDevIOCtl( ppv, pvAddrInfo, 0x0075, SCR_IOCTL_CATEGORY, hDevice )
PVOID FAR * ppv;     /* pointer to variable to receive selector:offset */
PVOID pvAddrInfo;    /* pointer to structure with address info         */
HFILE hDevice;       /* device handle                                  */

The SCR_ALLOCLDTOFF function allocates a logical descriptor table (LDT)
selector and offset for an area of memory.

Parameter   Description
----------------------------------------------------------------------------

ppv         Points to the variable that receives the allocated selector and
            offset.

pvAddrInfo  Points to the LDTADDRINFO structure that contains the address
            and size of memory for which a selector is requested.

hDevice     Identifies the screen device that receives the device-control
            function. This handle must have been created previously by using
            the DosOpen function.

Return Value

The return value is zero if the function is successful or the error
ERROR_I24_INVALID_PARAMETER if an error occurs.

Comments

Read/Write access is granted to data areas completely contained in the
address range 0xA0000 through 0xBFFFF. Read-only access is granted to data
areas outside this range, but inside the range 0x00000 through 0xFFFFF.
Attempts to access any address outside this range results in an error.

                                      o

Topic: SCR_DEALLOCLDT               0x0071      // Not Supported

APIRET DosDevIOCtl( 0L, psel, 0x0071, SCR_IOCTL_CATEGORY, hDevice )
PSEL psel;        /* pointer to LDT selector */
HFILE hDevice;    /* device handle           */

The SCR_DEALLOCLDT function deallocates a logical descriptor table (LDT)
selector previously allocated by the SCR_ALLOCLDT or SCR_ALLOCLDTOFF
function.

Parameter  Description
----------------------------------------------------------------------------

psel       Points to the logical descriptor table selector to be
           deallocated.

hDevice    Identifies the screen device that receives the device-control
           function. This handle must have been created previously by using
           the DosOpen function.

Return Value

The return value is zero if the function is successful or the error value
ERROR_I24_INVALID_PARAMETER if an error occurs.

                                      o