[18] | 1 | /* $Id: DEVINFO.H,v 1.1.1.1 2003/07/02 13:56:58 eleph Exp $ */
|
---|
| 2 | /*
|
---|
| 3 | * OS/2 definitions for logal and global info segments
|
---|
| 4 | *
|
---|
| 5 | * (C) 2000-2002 InnoTek Systemberatung GmbH
|
---|
| 6 | *
|
---|
| 7 | * This program is free software; you can redistribute it and/or
|
---|
| 8 | * modify it under the terms of the GNU General Public License as
|
---|
| 9 | * published by the Free Software Foundation; either version 2 of
|
---|
| 10 | * the License, or (at your option) any later version.
|
---|
| 11 | *
|
---|
| 12 | * This program is distributed in the hope that it will be useful,
|
---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 15 | * GNU General Public License for more details.
|
---|
| 16 | *
|
---|
| 17 | * You should have received a copy of the GNU General Public
|
---|
| 18 | * License along with this program; if not, write to the Free
|
---|
| 19 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
|
---|
| 20 | * USA.
|
---|
| 21 | *
|
---|
| 22 | */
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 | // Prevent multiple inclusion
|
---|
| 26 | #if !defined(DevInfo_h)
|
---|
| 27 | #define DevInfo_h 1
|
---|
| 28 |
|
---|
| 29 | #if !defined(__cplusplus)
|
---|
| 30 | #error C++ must be used for strict type checking
|
---|
| 31 | #endif
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | // Include the fundamental type definitions
|
---|
| 35 | #include "DevType.h"
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | // Global (per-system) information segment
|
---|
| 39 | struct GINFO
|
---|
| 40 | {
|
---|
| 41 | WORD32 Time; // Time in seconds since 1970.01.01
|
---|
| 42 | WORD32 MilliSeconds; // Time in milliseconds
|
---|
| 43 | BYTE Hour; // Current hour
|
---|
| 44 | BYTE Minute; // Current minute
|
---|
| 45 | BYTE Second; // Current second
|
---|
| 46 | BYTE Hundredth; // Current hundredth of a second
|
---|
| 47 | WORD16 Timezone; // Minutes from UTC (Greenwich mean-time)
|
---|
| 48 | WORD16 Interval; // Timer interval (tenths of milliseconds)
|
---|
| 49 | BYTE Day; // Current day of month
|
---|
| 50 | BYTE Month; // Current month
|
---|
| 51 | WORD16 Year; // Current year
|
---|
| 52 | BYTE Weekday; // Current day of week (0 = Sunday, 6 = Saturday)
|
---|
| 53 | BYTE MajorVersion; // Major version number of OS/2
|
---|
| 54 | BYTE MinorVersion; // Minor version number of OS/2
|
---|
| 55 | BYTE Revision; // Revision letter of OS/2
|
---|
| 56 | BYTE CurrentSession; // Current foreground full-screen session ID
|
---|
| 57 | BYTE MaxSessions; // Maximum number of full-screen sessions
|
---|
| 58 | BYTE HugeShift; // Shift count for huge segments
|
---|
| 59 | BYTE ProtectFlag; // 1 = protected mode only, 0 = mixed mode
|
---|
| 60 | WORD16 ForegroundPID; // Process ID of the current foreground process
|
---|
| 61 | BYTE DynamicFlag; // 1 = dynamic variation enabled, 0 = disabled
|
---|
| 62 | BYTE MaxWaitTime; // Maximum wait to get control (seconds)
|
---|
| 63 | WORD16 MinTimeSlice; // Minimum time slice length (milliseconds)
|
---|
| 64 | WORD16 MaxTimeSlice; // Maximum time slice length (milliseconds)
|
---|
| 65 | WORD16 BootDrive; // ID of system startup drive (1 = A:, 26 = Z:)
|
---|
| 66 | BYTE Trace[32]; // System tracing flags (RAS)
|
---|
| 67 | BYTE MaxVIOSessions; // Maximum number of VIO (windowed) sessions
|
---|
| 68 | BYTE MaxPMSessions; // Maximum number of PM sessions
|
---|
| 69 | WORD16 ErrorLog; // Error logging status
|
---|
| 70 | WORD16 RASSelector; // RAS memory mapped IO selector
|
---|
| 71 | WORD32 RASAddress; // RAS memory mapped IO address
|
---|
| 72 | BYTE MaxVDMSessions; // Maximum number of virtual DOS machines
|
---|
| 73 | };
|
---|
| 74 |
|
---|
| 75 | // Local (per-process) information segment
|
---|
| 76 | struct LINFO
|
---|
| 77 | {
|
---|
| 78 | WORD16 ProcessID; // Current process ID
|
---|
| 79 | WORD16 ParentID; // Current process' parent's PID
|
---|
| 80 | WORD16 Priority; // Current thread's priority
|
---|
| 81 | WORD16 ThreadID; // Current thread ID
|
---|
| 82 | WORD16 SessionID; // Current session ID
|
---|
| 83 | BYTE Status; // Process status
|
---|
| 84 | BYTE Unused1; // Unused
|
---|
| 85 | WORD16 ForegroundFlag; // Current process has keyboard focus
|
---|
| 86 | BYTE Type; // Type of process (0 = FS, 1 = real, 2 = VIO,
|
---|
| 87 | BYTE Unused2; // 3 = PM, 4 = detached)
|
---|
| 88 | WORD16 EnvSelector; // Selector for environment
|
---|
| 89 | WORD16 CommandLineOff; // Offset of command line in EnvironmentSel
|
---|
| 90 | WORD16 DSLength; // Length of data segment
|
---|
| 91 | WORD16 StackSize; // Size of stack (bytes)
|
---|
| 92 | WORD16 HeapSize; // Size of heap (bytes)
|
---|
| 93 | WORD16 Module; // Module handle
|
---|
| 94 | WORD16 DSSelector; // Selector for data segment
|
---|
| 95 | };
|
---|
| 96 |
|
---|
| 97 |
|
---|
| 98 | #endif // DevInfo_h
|
---|