1 | /* $Id: DEVINFO.H 142 2000-04-23 14:55:46Z ktk $ */
|
---|
2 |
|
---|
3 | /************************************************************************\
|
---|
4 | ** **
|
---|
5 | ** OS/2(r) Physical Device Driver Libraries **
|
---|
6 | ** for Watcom C/C++ 10 **
|
---|
7 | ** **
|
---|
8 | ** COPYRIGHT: **
|
---|
9 | ** **
|
---|
10 | ** (C) Copyright Advanced Gravis Computer Technology Ltd 1994. **
|
---|
11 | ** All Rights Reserved. **
|
---|
12 | ** **
|
---|
13 | ** DISCLAIMER OF WARRANTIES: **
|
---|
14 | ** **
|
---|
15 | ** The following [enclosed] code is provided to you "AS IS", **
|
---|
16 | ** without warranty of any kind. You have a royalty-free right to **
|
---|
17 | ** use, modify, reproduce and distribute the following code (and/or **
|
---|
18 | ** any modified version) provided that you agree that Advanced **
|
---|
19 | ** Gravis has no warranty obligations and shall not be liable for **
|
---|
20 | ** any damages arising out of your use of this code, even if they **
|
---|
21 | ** have been advised of the possibility of such damages. This **
|
---|
22 | ** Copyright statement and Disclaimer of Warranties may not be **
|
---|
23 | ** removed. **
|
---|
24 | ** **
|
---|
25 | \************************************************************************/
|
---|
26 |
|
---|
27 |
|
---|
28 | // DevInfo.h
|
---|
29 | //
|
---|
30 | // Type definitions for OS/2 2.x global and local info segments.
|
---|
31 | //
|
---|
32 | // History:
|
---|
33 | //
|
---|
34 | // Sep 30, 94 David Bollo Initial version
|
---|
35 |
|
---|
36 |
|
---|
37 | // Prevent multiple inclusion
|
---|
38 | #if !defined(DevInfo_h)
|
---|
39 | #define DevInfo_h 1
|
---|
40 |
|
---|
41 | #if !defined(__cplusplus)
|
---|
42 | #error C++ must be used for strict type checking
|
---|
43 | #endif
|
---|
44 |
|
---|
45 |
|
---|
46 | // Include the fundamental type definitions
|
---|
47 | #include "DevType.h"
|
---|
48 |
|
---|
49 |
|
---|
50 | // Global (per-system) information segment
|
---|
51 | struct GINFO
|
---|
52 | {
|
---|
53 | WORD32 Time; // Time in seconds since 1970.01.01
|
---|
54 | WORD32 MilliSeconds; // Time in milliseconds
|
---|
55 | BYTE Hour; // Current hour
|
---|
56 | BYTE Minute; // Current minute
|
---|
57 | BYTE Second; // Current second
|
---|
58 | BYTE Hundredth; // Current hundredth of a second
|
---|
59 | WORD16 Timezone; // Minutes from UTC (Greenwich mean-time)
|
---|
60 | WORD16 Interval; // Timer interval (tenths of milliseconds)
|
---|
61 | BYTE Day; // Current day of month
|
---|
62 | BYTE Month; // Current month
|
---|
63 | WORD16 Year; // Current year
|
---|
64 | BYTE Weekday; // Current day of week (0 = Sunday, 6 = Saturday)
|
---|
65 | BYTE MajorVersion; // Major version number of OS/2
|
---|
66 | BYTE MinorVersion; // Minor version number of OS/2
|
---|
67 | BYTE Revision; // Revision letter of OS/2
|
---|
68 | BYTE CurrentSession; // Current foreground full-screen session ID
|
---|
69 | BYTE MaxSessions; // Maximum number of full-screen sessions
|
---|
70 | BYTE HugeShift; // Shift count for huge segments
|
---|
71 | BYTE ProtectFlag; // 1 = protected mode only, 0 = mixed mode
|
---|
72 | WORD16 ForegroundPID; // Process ID of the current foreground process
|
---|
73 | BYTE DynamicFlag; // 1 = dynamic variation enabled, 0 = disabled
|
---|
74 | BYTE MaxWaitTime; // Maximum wait to get control (seconds)
|
---|
75 | WORD16 MinTimeSlice; // Minimum time slice length (milliseconds)
|
---|
76 | WORD16 MaxTimeSlice; // Maximum time slice length (milliseconds)
|
---|
77 | WORD16 BootDrive; // ID of system startup drive (1 = A:, 26 = Z:)
|
---|
78 | BYTE Trace[32]; // System tracing flags (RAS)
|
---|
79 | BYTE MaxVIOSessions; // Maximum number of VIO (windowed) sessions
|
---|
80 | BYTE MaxPMSessions; // Maximum number of PM sessions
|
---|
81 | WORD16 ErrorLog; // Error logging status
|
---|
82 | WORD16 RASSelector; // RAS memory mapped IO selector
|
---|
83 | WORD32 RASAddress; // RAS memory mapped IO address
|
---|
84 | BYTE MaxVDMSessions; // Maximum number of virtual DOS machines
|
---|
85 | };
|
---|
86 |
|
---|
87 | // Local (per-process) information segment
|
---|
88 | struct LINFO
|
---|
89 | {
|
---|
90 | WORD16 ProcessID; // Current process ID
|
---|
91 | WORD16 ParentID; // Current process' parent's PID
|
---|
92 | WORD16 Priority; // Current thread's priority
|
---|
93 | WORD16 ThreadID; // Current thread ID
|
---|
94 | WORD16 SessionID; // Current session ID
|
---|
95 | BYTE Status; // Process status
|
---|
96 | BYTE Unused1; // Unused
|
---|
97 | WORD16 ForegroundFlag; // Current process has keyboard focus
|
---|
98 | BYTE Type; // Type of process (0 = FS, 1 = real, 2 = VIO,
|
---|
99 | BYTE Unused2; // 3 = PM, 4 = detached)
|
---|
100 | WORD16 EnvSelector; // Selector for environment
|
---|
101 | WORD16 CommandLineOff; // Offset of command line in EnvironmentSel
|
---|
102 | WORD16 DSLength; // Length of data segment
|
---|
103 | WORD16 StackSize; // Size of stack (bytes)
|
---|
104 | WORD16 HeapSize; // Size of heap (bytes)
|
---|
105 | WORD16 Module; // Module handle
|
---|
106 | WORD16 DSSelector; // Selector for data segment
|
---|
107 | };
|
---|
108 |
|
---|
109 |
|
---|
110 | #endif // DevInfo_h
|
---|