|
|
1.1 root 1: /***************************************************************************\
2: *
3: * Module Name: BSEDEV.H
4: *
5: * OS/2 Structures and constants for use with DosDevIOCtl
6: *
7: * Copyright (c) 1989 Microsoft Corporation
8: *
9: \***************************************************************************/
10:
11: /* Input and Output Control Categories */
12:
13: #define IOCTL_ASYNC 0x0001
14: #define IOCTL_SCR_AND_PTRDRAW 0x0003
15: #define IOCTL_KEYBOARD 0x0004
16: #define IOCTL_PRINTER 0x0005
17: #define IOCTL_LIGHTPEN 0x0006
18: #define IOCTL_POINTINGDEVICE 0x0007
19: #define IOCTL_DISK 0x0008
20: #define IOCTL_PHYSICALDISK 0x0009
21: #define IOCTL_MONITOR 0x000A
22: #define IOCTL_GENERAL 0x000B
23:
24: /* Serial-Device Control */
25:
26: #define ASYNC_SETBAUDRATE 0x0041
27: #define ASYNC_SETLINECTRL 0x0042
28: #define ASYNC_TRANSMITIMM 0x0044
29: #define ASYNC_SETBREAKOFF 0x0045
30: #define ASYNC_SETMODEMCTRL 0x0046
31: #define ASYNC_SETBREAKON 0x004B
32: #define ASYNC_STOPTRANSMIT 0x0047
33: #define ASYNC_STARTTRANSMIT 0x0048
34: #define ASYNC_SETDCBINFO 0x0053
35: #define ASYNC_GETBAUDRATE 0x0061
36: #define ASYNC_GETLINECTRL 0x0062
37: #define ASYNC_GETCOMMSTATUS 0x0064
38: #define ASYNC_GETLINESTATUS 0x0065
39: #define ASYNC_GETMODEMOUTPUT 0x0066
40: #define ASYNC_GETMODEMINPUT 0x0067
41: #define ASYNC_GETINQUECOUNT 0x0068
42: #define ASYNC_GETOUTQUECOUNT 0x0069
43: #define ASYNC_GETCOMMERROR 0x006D
44: #define ASYNC_GETCOMMEVENT 0x0072
45: #define ASYNC_GETDCBINFO 0x0073
46:
47: /* Screen/Pointer-Draw Control */
48:
49: #define PTR_GETPTRDRAWADDRESS 0x0072
50:
51: /* Keyboard Control */
52:
53: #define KBD_SETTRANSTABLE 0x0050
54: #define KBD_SETINPUTMODE 0x0051
55: #define KBD_SETINTERIMFLAG 0x0052
56: #define KBD_SETSHIFTSTATE 0x0053
57: #define KBD_SETTYPAMATICRATE 0x0054
58: #define KBD_SETFGNDSCREENGRP 0x0055
59: #define KBD_SETSESMGRHOTKEY 0x0056
60: #define KBD_SETFOCUS 0x0057
61: #define KBD_SETKCB 0x0058
62: #define KBD_SETNLS 0x005C
63: #define KBD_CREATE 0x005D
64: #define KBD_DESTROY 0x005E
65: #define KBD_GETINPUTMODE 0x0071
66: #define KBD_GETINTERIMFLAG 0x0072
67: #define KBD_GETSHIFTSTATE 0x0073
68: #define KBD_READCHAR 0x0074
69: #define KBD_PEEKCHAR 0x0075
70: #define KBD_GETSESMGRHOTKEY 0x0076
71: #define KBD_GETKEYBDTYPE 0x0077
72: #define KBD_GETCODEPAGEID 0x0078
73: #define KBD_XLATESCAN 0x0079
74:
75: /* Printer Control */
76:
77: #define PRT_SETFRAMECTL 0x0042
78: #define PRT_SETINFINITERETRY 0x0044
79: #define PRT_INITPRINTER 0x0046
80: #define PRT_ACTIVATEFONT 0x0048
81: #define PRT_GETFRAMECTL 0x0062
82: #define PRT_GETINFINITERETRY 0x0064
83: #define PRT_GETPRINTERSTATUS 0x0066
84: #define PRT_QUTRYACTIVEFONT 0x0069
85: #define PRT_VERIFYFONT 0x006A
86:
87: /* Pointing-Device (Mouse) Control */
88:
89: #define MOU_ALLOWPTRDRAW 0x0050
90: #define MOU_UPDATEDISPLAYMODE 0x0051
91: #define MOU_SCREENSWITCH 0x0052
92: #define MOU_SETSCALEFACTORS 0x0053
93: #define MOU_SETEVENTMASK 0x0054
94: #define MOU_SETHOTKEYBUTTON 0x0055
95: #define MOU_SETPTRSHAPE 0x0056
96: #define MOU_DRAWPTR 0x0057
97: #define MOU_REMOVEPTR 0x0058
98: #define MOU_SETPTRPOS 0x0059
99: #define MOU_SETPROTDRAWADDRESS 0x005A
100: #define MOU_SETREALDRAWADDRESS 0x005B
101: #define MOU_SETMOUSTATUS 0x005C
102: #define MOU_GETBUTTONCOUNT 0x0060
103: #define MOU_GETMICKEYCOUNT 0x0061
104: #define MOU_GETMOUSTATUS 0x0062
105: #define MOU_READEVENTQUE 0x0063
106: #define MOU_GETQUESTATUS 0x0064
107: #define MOU_GETEVENTMASK 0x0065
108: #define MOU_GETSCALEFACTORS 0x0066
109: #define MOU_GETPTRPOS 0x0067
110: #define MOU_GETPTRSHAPE 0x0068
111: #define MOU_GETHOTKEYBUTTON 0x0069
112:
113: /* Disk/Diskette Control */
114:
115: #define DSK_LOCKDRIVE 0x0000
116: #define DSK_UNLOCKDRIVE 0x0001
117: #define DSK_REDETERMINEMEDIA 0x0002
118: #define DSK_SETLOGICALMAP 0x0003
119: #define DSK_BLOCKREMOVABLE 0x0020
120: #define DSK_GETLOGICALMAP 0x0021
121: #define DSK_SETDEVICEPARAMS 0x0043
122: #define DSK_WRITETRACK 0x0044
123: #define DSK_FORMATVERIFY 0x0045
124: #define DSK_GETDEVICEPARAMS 0x0063
125: #define DSK_READTRACK 0x0064
126: #define DSK_VERIFYTRACK 0x0065
127:
128: /* Physical-Disk Control */
129:
130: #define PDSK_LOCKPHYSDRIVE 0x0000
131: #define PDSK_UNLOCKPHYSDRIVE 0x0001
132: #define PDSK_WRITEPHYSTRACK 0x0044
133: #define PDSK_GETPHYSDEVICEPARAMS 0x0063
134: #define PDSK_READPHYSTRACK 0x0064
135: #define PDSK_VERIFYPHYSTRACK 0x0065
136:
137: /* Character-Monitor Control */
138:
139: #define MON_REGISTERMONITOR 0x0040
140:
141: /* General Device Control */
142:
143: #define DEV_FLUSHINPUT 0x0001
144: #define DEV_FLUSHOUTPUT 0x0002
145: #define DEV_QUERYMONSUPPORT 0x0060
146:
147:
148: /* ASYNC_GETCOMMERROR, ASYNC_SETBREAKOFF, ASYNC_SETBREAKON, ASYNC_SETMODEMCTRL */
149:
150: #define RX_QUE_OVERRUN 0x0001
151: #define RX_HARDWARE_OVERRUN 0x0002
152: #define PARITY_ERROR 0x0004
153: #define FRAMING_ERROR 0x0008
154:
155: /* ASYNC_GETCOMMEVENT */
156:
157: #define CHAR_RECEIVED 0x0001
158: #define LAST_CHAR_SENT 0x0004
159: #define CTS_CHANGED 0x0008
160: #define DSR_CHANGED 0x0010
161: #define DCD_CHANGED 0x0020
162: #define BREAK_DETECTED 0x0040
163: #define ERROR_OCCURRED 0x0080
164: #define RI_DETECTED 0x0100
165:
166: /* ASYNC_GETCOMMSTATUS */
167:
168: #define TX_WAITING_FOR_CTS 0x0001
169: #define TX_WAITING_FOR_DSR 0x0002
170: #define TX_WAITING_FOR_DCD 0x0004
171: #define TX_WAITING_FOR_XON 0x0008
172: #define TX_WAITING_TO_SEND_XON 0x0010
173: #define TX_WAITING_WHILE_BREAK_ON 0x0020
174: #define TX_WAITING_TO_SEND_IMM 0x0040
175: #define RX_WAITING_FOR_DSR 0x0080
176:
177: /* ASYNC_GETLINESTATUS */
178:
179: #define WRITE_REQUEST_QUEUED 0x0001
180: #define DATA_IN_TX_QUE 0x0002
181: #define HARDWARE_TRANSMITTING 0x0004
182: #define CHAR_READY_TO_SEND_IMM 0x0008
183: #define WAITING_TO_SEND_XON 0x0010
184: #define WAITING_TO_SEND_XOFF 0x0020
185:
186: /* ASYNC_GETMODEMINPUT */
187:
188: #define CTS_ON 0x10
189: #define DSR_ON 0x20
190: #define RI_ON 0x40
191: #define DCD_ON 0x80
192:
193: /* DSK_SETDEVICEPARAMS */
194:
195: #define BUILD_BPB_FROM_MEDIUM 0x00
196: #define REPLACE_BPB_FOR_DEVICE 0x01
197: #define REPLACE_BPB_FOR_MEDIUM 0x02
198:
199: /* KBD_GETINPUTMODE, KBD_PEEKCHAR, KBD_SETINPUTMODE*/
200:
201: #define ASCII_MODE 0x00
202: #define BINARY_MODE 0x80
203:
204: /* KBD_GETINTERIMFLAG */
205:
206: #define CONVERSION_REQUEST 0x20
207: #define INTERIM_CHAR 0x80
208:
209: /* KBD_GETSESMGRHOTKEY */
210:
211: #define HOTKEY_MAX_COUNT 0x0000
212: #define HOTKEY_CURRENT_COUNT 0x0001
213:
214: /* KBD_PEEKCHAR */
215:
216: #define KBD_DATA_RECEIVED 0x0001
217: #define KBD_DATA_BINARY 0x8000
218:
219: /* KBD_READCHAR */
220:
221: #define KBD_READ_WAIT 0x0000
222: #define KBD_READ_NOWAIT 0x8000
223:
224: /* KBD_SETINPUTMODE */
225:
226: #define SHIFT_REPORT_MODE 0x01
227:
228: #ifndef INCL_MOU
229:
230: #define MOUSE_MOTION 0x0001
231: #define MOUSE_MOTION_WITH_BN1_DOWN 0x0002
232: #define MOUSE_BN1_DOWN 0x0004
233: #define MOUSE_MOTION_WITH_BN2_DOWN 0x0008
234: #define MOUSE_BN2_DOWN 0x0010
235: #define MOUSE_MOTION_WITH_BN3_DOWN 0x0020
236: #define MOUSE_BN3_DOWN 0x0040
237:
238: #define MHK_BUTTON1 0x0001
239: #define MHK_BUTTON2 0x0002
240: #define MHK_BUTTON3 0x0004
241:
242: #define MOU_NOWAIT 0x0000
243: #define MOU_WAIT 0x0001
244:
245: #endif /* #ifndef INCL_MOU */
246:
247: /* MOU_GETHOTKEYBUTTON, MOU_SETHOTKEYBUTTON */
248:
249: #define MHK_NO_HOTKEY 0x0000
250:
251: /* MOU_GETMOUSTATUS */
252:
253: #define MOUSE_QUEUEBUSY 0x0001
254: #define MOUSE_BLOCKREAD 0x0002
255: #define MOUSE_FLUSH 0x0004
256: #define MOUSE_UNSUPPORTED_MODE 0x0008
257: #define MOUSE_DISABLED 0x0100
258: #define MOUSE_MICKEYS 0x0200
259:
260: /* PRT_GETPRINTERSTATUS */
261:
262: #define PRINTER_TIMEOUT 0x0001
263: #define PRINTER_IO_ERROR 0x0008
264: #define PRINTER_SELECTED 0x0010
265: #define PRINTER_OUT_OF_PAPER 0x0020
266: #define PRINTER_ACKNOWLEDGED 0x0040
267: #define PRINTER_NOT_BUSY 0x0080
268:
269: /* fbCtlHndShake */
270:
271: #define MODE_DTR_CONTROL 0x01
272: #define MODE_DTR_HANDSHAKE 0x02
273: #define MODE_CTS_HANDSHAKE 0x08
274: #define MODE_DSR_HANDSHAKE 0x10
275: #define MODE_DCD_HANDSHAKE 0x20
276: #define MODE_DSR_SENSITIVITY 0x40
277:
278: /* fbFlowReplace */
279:
280: #define MODE_AUTO_TRANSMIT 0x01
281: #define MODE_AUTO_RECEIVE 0x02
282: #define MODE_ERROR_CHAR 0x04
283: #define MODE_NULL_STRIPPING 0x08
284: #define MODE_BREAK_CHAR 0x10
285: #define MODE_RTS_CONTROL 0x40
286: #define MODE_RTS_HANDSHAKE 0x80
287: #define MODE_TRANSMIT_TOGGLE 0xC0
288:
289: /* fbTimeout */
290:
291: #define MODE_NO_WRITE_TIMEOUT 0x01
292: #define MODE_READ_TIMEOUT 0x02
293: #define MODE_WAIT_READ_TIMEOUT 0x04
294: #define MODE_NOWAIT_READ_TIMEOUT 0x06
295:
296: typedef struct _DCBINFO { /* dcbinf */
297: USHORT usWriteTimeout;
298: USHORT usReadTimeout;
299: BYTE fbCtlHndShake;
300: BYTE fbFlowReplace;
301: BYTE fbTimeout;
302: BYTE bErrorReplacementChar;
303: BYTE bBreakReplacementChar;
304: BYTE bXONChar;
305: BYTE bXOFFChar;
306: } DCBINFO;
307: typedef DCBINFO FAR *PDCBINFO;
308:
309: typedef struct _TRACKLAYOUT { /* trckl */
310: BYTE bCommand;
311: USHORT usHead;
312: USHORT usCylinder;
313: USHORT usFirstSector;
314: USHORT cSectors;
315: struct {
316: USHORT usSectorNumber;
317: USHORT usSectorSize;
318: } TrackTable[1];
319: } TRACKLAYOUT;
320: typedef TRACKLAYOUT FAR *PTRACKLAYOUT;
321:
322: #define DEVTYPE_48TPI 0x0000
323: #define DEVTYPE_96TPI 0x0001
324: #define DEVTYPE_35 0x0002
325: #define DEVTYPE_8SD 0x0003
326: #define DEVTYPE_8DD 0x0004
327: #define DEVTYPE_FIXED 0x0005
328: #define DEVTYPE_TAPE 0x0006
329: #define DEVTYPE_UNKNOWN 0x0007
330:
331: typedef struct _BIOSPARAMETERBLOCK { /* bspblk */
332: USHORT usBytesPerSector;
333: BYTE bSectorsPerCluster;
334: USHORT usReservedSectors;
335: BYTE cFATs;
336: USHORT cRootEntries;
337: USHORT cSectors;
338: BYTE bMedia;
339: USHORT usSectorsPerFAT;
340: USHORT usSectorsPerTrack;
341: USHORT cHeads;
342: ULONG cHiddenSectors;
343: ULONG cLargeSectors;
344: USHORT cCylinders;
345: BYTE bDeviceType;
346: USHORT fsDeviceAttr;
347: } BIOSPARAMETERBLOCK;
348: typedef BIOSPARAMETERBLOCK FAR *PBIOSPARAMETERBLOCK;
349:
350: typedef struct _SCREENGROUP { /* scrgrp */
351: USHORT idScreenGrp;
352: USHORT fTerminate;
353: } SCREENGROUP;
354: typedef SCREENGROUP FAR *PSCREENGROUP;
355:
356: typedef struct _FRAME { /* frm */
357: BYTE bCharsPerLine;
358: BYTE bLinesPerInch;
359: } FRAME;
360: typedef FRAME FAR *PFRAME;
361:
362: typedef struct _KBDTYPE { /* kbdtyp */
363: USHORT usType;
364: USHORT reserved1;
365: USHORT reserved2;
366: } KBDTYPE;
367: typedef KBDTYPE FAR *PKBDTYPE;
368:
369: typedef struct _LINECONTROL { /* lnctl */
370: BYTE bDataBits;
371: BYTE bParity;
372: BYTE bStopBits;
373: BYTE fTransBreak;
374: } LINECONTROL;
375: typedef LINECONTROL FAR *PLINECONTROL;
376:
377: /* MODEMSTATUS.fbModemOn, ASYNC_GETMODEMOUTPUT */
378:
379: #define DTR_ON 0x01
380: #define RTS_ON 0x02
381:
382: /* MODEMSTATUS.fbModemOff */
383:
384: #define DTR_OFF 0xFE
385: #define RTS_OFF 0xFD
386:
387: typedef struct _MODEMSTATUS { /* mdmst */
388: BYTE fbModemOn;
389: BYTE fbModemOff;
390: } MODEMSTATUS;
391: typedef MODEMSTATUS FAR *PMODEMSTATUS;
392:
393: typedef struct _TRACKFORMAT { /* trckfmt */
394: BYTE bCommand;
395: USHORT usHead;
396: USHORT usCylinder;
397: USHORT usReserved;
398: USHORT cSectors;
399: struct {
400: BYTE bCylinder;
401: BYTE bHead;
402: BYTE idSector;
403: BYTE bBytesSector;
404: } FormatTable[1];
405: } TRACKFORMAT;
406: typedef TRACKFORMAT FAR *PTRACKFORMAT;
407:
408: typedef struct _RXQUEUE { /* rxq */
409: USHORT cch;
410: USHORT cb;
411: } RXQUEUE;
412: typedef RXQUEUE FAR *PRXQUEUE;
413:
414: typedef struct _DEVICEPARAMETERBLOCK { /* dvpblck */
415: USHORT reserved1;
416: USHORT cCylinders;
417: USHORT cHeads;
418: USHORT cSectorsPerTrack;
419: USHORT reserved2;
420: USHORT reserved3;
421: USHORT reserved4;
422: USHORT reserved5;
423: } DEVICEPARAMETERBLOCK;
424: typedef DEVICEPARAMETERBLOCK FAR *PDEVICEPARAMETERBLOCK;
425:
426: typedef struct _PTRDRAWFUNCTION { /* ptrdfnc */
427: USHORT usReturnCode;
428: PFN pfnDraw;
429: PCH pchDataSeg;
430: } PTRDRAWFUNCTION;
431: typedef PTRDRAWFUNCTION FAR *PPTRDRAWFUNCTION;
432:
433: typedef struct _SHIFTSTATE { /* shftst */
434: USHORT fsState;
435: BYTE fNLS;
436: } SHIFTSTATE;
437: typedef SHIFTSTATE FAR *PSHIFTSTATE;
438:
439: /* HOTKEY.fsHotKey/SHIFTSTATE.fsState */
440:
441: #define RIGHTSHIFT 0x0001
442: #define LEFTSHIFT 0x0002
443: #define CONTROL 0x0004
444: #define ALT 0x0008
445: #define SCROLLLOCK_ON 0x0010
446: #define NUMLOCK_ON 0x0020
447: #define CAPSLOCK_ON 0x0040
448: #define INSERT_ON 0x0080
449: #define LEFTCONTROL 0x0100
450: #define LEFTALT 0x0200
451: #define RIGHTCONTROL 0x0400
452: #define RIGHTALT 0x0800
453: #define SCROLLLOCK 0x1000
454: #define NUMLOCK 0x2000
455: #define CAPSLOCK 0x4000
456: #define SYSREQ 0x8000
457:
458: typedef struct _HOTKEY { /* htky */
459: USHORT fsHotKey;
460: UCHAR uchScancodeMake;
461: UCHAR uchScancodeBreak;
462: USHORT idHotKey;
463: } HOTKEY;
464: typedef HOTKEY FAR *PHOTKEY;
465:
466: typedef struct _MONITORPOSITION { /* mnpos */
467: USHORT fPosition;
468: USHORT index;
469: ULONG pbInBuf;
470: USHORT offOutBuf;
471: } MONITORPOSITION;
472: typedef MONITORPOSITION FAR *PMONITORPOSITION;
473:
474: typedef struct _RATEDELAY { /* rtdly */
475: USHORT usDelay;
476: USHORT usRate;
477: } RATEDELAY;
478: typedef RATEDELAY FAR *PRATEDELAY;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.