source: trunk/src/kernel32/dosqss.h@ 1924

Last change on this file since 1924 was 1924, checked in by sandervl, 25 years ago

added GetProcessTimes + several fixes

File size: 3.3 KB
Line 
1/* $Id: dosqss.h,v 1.1 1999-12-01 18:40:47 sandervl Exp $ */
2#ifndef DOSQSS_H
3#define DOSQSS_H
4
5#ifndef RESERVED
6#define RESERVED 0
7#endif
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12APIRET APIENTRY DosQuerySysState(ULONG func,ULONG arg1,ULONG arg2,
13 ULONG _res_,PVOID buf,ULONG bufsz);
14
15#ifdef __cplusplus
16}
17#endif
18
19inline APIRET _DosQuerySysState(ULONG func,ULONG arg1,ULONG arg2,
20 ULONG _res_,PVOID buf,ULONG bufsz)
21{
22 APIRET yyrc;
23 USHORT sel = RestoreOS2FS();
24
25 yyrc = DosQuerySysState(func, arg1, arg2, _res_, buf, bufsz);
26 SetFS(sel);
27
28 return yyrc;
29}
30
31#undef DosAllocMem
32#define DosAllocMem _DosAllocMem
33
34typedef struct {
35 ULONG threadcnt;
36 ULONG proccnt;
37 ULONG modulecnt;
38} QGLOBAL, *PQGLOBAL;
39
40typedef struct {
41 ULONG rectype; /* 256 for thread */
42 USHORT threadid;
43 USHORT slotid;
44 ULONG sleepid;
45 ULONG priority;
46 ULONG systime;
47 ULONG usertime;
48 UCHAR state;
49 UCHAR _reserved1_; /* padding to ULONG */
50 USHORT _reserved2_; /* padding to ULONG */
51} QTHREAD, *PQTHREAD;
52
53typedef struct {
54 USHORT sfn;
55 USHORT refcnt;
56 ULONG flags;
57 ULONG accmode;
58 ULONG filesize;
59 USHORT volhnd;
60 USHORT attrib;
61 USHORT _reserved_;
62} QFDS, *PQFDS;
63
64typedef struct qfile {
65 ULONG rectype; /* 8 for file */
66 struct qfile *next;
67 ULONG opencnt;
68 PQFDS filedata;
69 char name[1];
70} QFILE, *PQFILE;
71
72typedef struct {
73 ULONG rectype; /* 1 for process */
74 PQTHREAD threads;
75 USHORT pid;
76 USHORT ppid;
77 ULONG type;
78 ULONG state;
79 ULONG sessid;
80 USHORT hndmod;
81 USHORT threadcnt;
82 ULONG privsem32cnt;
83 ULONG _reserved2_;
84 USHORT sem16cnt;
85 USHORT dllcnt;
86 USHORT shrmemcnt;
87 USHORT fdscnt;
88 PUSHORT sem16s;
89 PUSHORT dlls;
90 PUSHORT shrmems;
91 PUSHORT fds;
92} QPROCESS, *PQPROCESS;
93
94typedef struct sema {
95 struct sema *next;
96 USHORT refcnt;
97 UCHAR sysflags;
98 UCHAR sysproccnt;
99 ULONG _reserved1_;
100 USHORT index;
101 CHAR name[1];
102} QSEMA, *PQSEMA;
103
104typedef struct {
105 ULONG rectype; /**/
106 ULONG _reserved1_;
107 USHORT _reserved2_;
108 USHORT syssemidx;
109 ULONG index;
110 QSEMA sema;
111} QSEMSTRUC, *PQSEMSTRUC;
112
113typedef struct {
114 USHORT pid;
115 USHORT opencnt;
116} QSEMOWNER32, *PQSEMOWNER32;
117
118typedef struct {
119 PQSEMOWNER32 own;
120 PCHAR name;
121 PVOID semrecs; /* array of associated sema's */
122 USHORT flags;
123 USHORT semreccnt;
124 USHORT waitcnt;
125 USHORT _reserved_; /* padding to ULONG */
126} QSEMSMUX32, *PQSEMSMUX32;
127
128typedef struct {
129 PQSEMOWNER32 own;
130 PCHAR name;
131 PQSEMSMUX32 mux;
132 USHORT flags;
133 USHORT postcnt;
134} QSEMEV32, *PQSEMEV32;
135
136typedef struct {
137 PQSEMOWNER32 own;
138 PCHAR name;
139 PQSEMSMUX32 mux;
140 USHORT flags;
141 USHORT refcnt;
142 USHORT thrdnum;
143 USHORT _reserved_; /* padding to ULONG */
144} QSEMMUX32, *PQSEMMUX32;
145
146typedef struct semstr32 {
147 struct semstr32 *next;
148 QSEMEV32 evsem;
149 QSEMMUX32 muxsem;
150 QSEMSMUX32 smuxsem;
151} QSEM32STRUC, *PQSEM32STRUC;
152
153typedef struct shrmem {
154 struct shrmem *next;
155 USHORT hndshr;
156 USHORT selshr;
157 USHORT refcnt;
158 CHAR name[1];
159} QSHRMEM, *PQSHRMEM;
160
161typedef struct module {
162 struct module *next;
163 USHORT hndmod;
164 USHORT type;
165 ULONG refcnt;
166 ULONG segcnt;
167 PVOID _reserved_;
168 PCHAR name;
169 USHORT modref[1];
170} QMODULE, *PQMODULE;
171
172typedef struct {
173 PQGLOBAL gbldata;
174 PQPROCESS procdata;
175 PQSEMSTRUC semadata;
176 PQSEM32STRUC sem32data; /* not always present */
177 PQSHRMEM shrmemdata;
178 PQMODULE moddata;
179 PVOID _reserved2_;
180 PQFILE filedata; /* only present in FP19 or later or W4 */
181} QTOPLEVEL, *PQTOPLEVEL;
182
183#endif
Note: See TracBrowser for help on using the repository browser.