source: trunk/include/helpers/procstat.h@ 24

Last change on this file since 24 was 14, checked in by umoeller, 25 years ago

Major updates; timers, LVM, miscellaneous.

  • Property svn:eol-style set to CRLF
  • Property svn:keywords set to Author Date Id Revision
File size: 25.3 KB
Line 
1/* $Id: procstat.h 14 2000-12-09 19:19:42Z umoeller $ */
2
3
4/*
5 *@@sourcefile procstat.h:
6 * header file for procstat.c (querying process information).
7 * See remarks there.
8 *
9 * Note: Version numbering in this file relates to XWorkplace version
10 * numbering.
11 *
12 *@@include #include <os2.h>
13 *@@include #include "procstat.h"
14 */
15
16/*
17 * This file Copyright (C) 1992-99 Ulrich M”ller,
18 * Kai Uwe Rommel.
19 * This file is part of the "XWorkplace helpers" source package.
20 * This is free software; you can redistribute it and/or modify
21 * it under the terms of the GNU General Public License as published
22 * by the Free Software Foundation, in version 2 as it comes in the
23 * "COPYING" file of the XWorkplace main distribution.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
28 */
29
30#if __cplusplus
31extern "C" {
32#endif
33
34#ifndef PROCSTAT_HEADER_INCLUDED
35 #define PROCSTAT_HEADER_INCLUDED
36
37 #pragma pack(1)
38
39 /********************************************************************
40 *
41 * DosQProcStatus declarations (16-bit)
42 *
43 ********************************************************************/
44
45 #define PTR(ptr, ofs) ((void *) ((char *) (ptr) + (ofs)))
46
47 /* DosQProcStatus() = DOSCALLS.154 */
48 USHORT APIENTRY16 DosQProcStatus(PVOID pBuf, USHORT cbBuf);
49 /* DosGetPrty = DOSCALLS.9 */
50 USHORT APIENTRY16 DosGetPrty(USHORT usScope, PUSHORT pusPriority, USHORT pid);
51
52 /*
53 *@@ QPROCSTAT16:
54 * "header" structure returned by DosQProcStat,
55 * containing the offsets to the other data
56 */
57
58 typedef struct _QPROCSTAT16
59 {
60 ULONG ulGlobal; // offset to global data section (QGLOBAL16)
61 ULONG ulProcesses; // offset to process data section (QPROCESS16)
62 ULONG ulSemaphores; // offset to semaphore data section
63 ULONG ulUnknown1;
64 ULONG ulSharedMem; // offset to shared mem data section
65 ULONG ulModules; // offset to DLL data section (QMODULE16)
66 ULONG ulUnknown2;
67 ULONG ulUnknown3;
68 } QPROCSTAT16, *PQPROCSTAT16;
69
70 /*
71 *@@ QGLOBAL16:
72 * at offset QPROCSTAT.ulGlobal, contains
73 * global system information (no. of threads)
74 */
75
76 typedef struct _QGLOBAL16
77 {
78 ULONG ulThreads; // total number of threads;
79 ULONG ulReserved1,
80 ulReserved2;
81 } QGLOBAL16, *PQGLOBAL16;
82
83 /*
84 *@@ QPROCESS16:
85 * DosQProcStat structure for process info
86 */
87
88 typedef struct _QPROCESS16
89 {
90 ULONG ulType; // 1 for processes
91 ULONG ulThreadList; // ofs to array of QTHREAD16 structs
92 USHORT usPID;
93 USHORT usParentPID;
94 ULONG ulSessionType;
95 // according to bsedos.h, the PROG_* types are identical
96 // to the SSF_TYPE_* types, so we have:
97 // -- PROG_DEFAULT 0
98 // -- PROG_FULLSCREEN 1
99 // -- PROG_WINDOWABLEVIO 2
100 // -- PROG_PM 3
101 // -- PROG_GROUP 5
102 // -- PROG_REAL 4
103 // -- PROG_VDM 4
104 // -- PROG_WINDOWEDVDM 7
105 // -- PROG_DLL 6
106 // -- PROG_PDD 8
107 // -- PROG_VDD 9
108 // -- PROG_WINDOW_REAL 10
109 // -- PROG_WINDOW_PROT 11
110 // -- PROG_30_STD 11
111 // -- PROG_WINDOW_AUTO 12
112 // -- PROG_SEAMLESSVDM 13
113 // -- PROG_30_STDSEAMLESSVDM 13
114 // -- PROG_SEAMLESSCOMMON 14
115 // -- PROG_30_STDSEAMLESSCOMMON 14
116 // -- PROG_31_STDSEAMLESSVDM 15
117 // -- PROG_31_STDSEAMLESSCOMMON 16
118 // -- PROG_31_ENHSEAMLESSVDM 17
119 // -- PROG_31_ENHSEAMLESSCOMMON 18
120 // -- PROG_31_ENH 19
121 // -- PROG_31_STD 20
122 // -- PROG_RESERVED 255
123 ULONG ulStatus; // see status #define's below
124 ULONG ulSID; // session (screen group) ID
125 USHORT usHModule; // program module handle for process
126 USHORT usThreads; // # of TCBs in use in process
127 ULONG ulReserved1;
128 ULONG ulReserved2;
129 USHORT usSemaphores; // # of 16-bit semaphores
130 USHORT usDLLs; // # of linked DLLs
131 USHORT usSharedMems;
132 USHORT usReserved3;
133 ULONG ulSemList; // offset to semaphore list
134 ULONG ulDLLList; // offset to DLL list
135 ULONG ulSharedMemList; // offset to shared mem list
136 ULONG ulReserved4;
137 } QPROCESS16, *PQPROCESS16;
138
139 // process status flags
140 #define STAT_EXITLIST 0x01 // processing exit list
141 #define STAT_EXIT1 0x02 // exiting thread 1
142 #define STAT_EXITALL 0x04 // whole process is exiting
143 #define STAT_PARSTAT 0x10 // parent cares about termination
144 #define STAT_SYNCH 0x20 // parent did exec-and-wait
145 #define STAT_DYING 0x40 // process is dying
146 #define STAT_EMBRYO 0x80 // process is in emryonic state
147
148 /*
149 *@@ QTHREAD16:
150 * DosQProcStat structure for thread info
151 */
152
153 typedef struct _QTHREAD16
154 {
155 ULONG ulType; // 0x100 for thread records
156 USHORT usTID; // thread ID
157 USHORT usThreadSlotID; // ???
158 ULONG ulBlockID; // sleep id thread is sleeping on
159 ULONG ulPriority;
160 ULONG ulSysTime;
161 ULONG ulUserTime;
162 UCHAR ucStatus; // TSTAT_* flags
163 UCHAR ucReserved1;
164 USHORT usReserved2;
165 } QTHREAD16, *PQTHREAD16;
166
167 // thread status flags
168 #define TSTAT_VOID 0 // uninitialized
169 #define TSTAT_READY 1 // ready to run (waiting for CPU time)
170 #define TSTAT_BLOCKED 2 // blocked on a block ID
171 #define TSTAT_SUSPENDED 3 // DosSuspendThread
172 #define TSTAT_CRITSEC 4 // blocked by another thread in a critical section
173 #define TSTAT_RUNNING 5 // currently running
174 #define TSTAT_READYBOOST 6 // ready, but apply I/O boost
175 #define TSTAT_TSD 7 // thead waiting for thread swappable data (TSD)
176 #define TSTAT_DELAYED 8 // delayed TKWakeup (almost ready)
177 #define TSTAT_FROZEN 9 // frozen (FF_ICE)
178 #define TSTAT_GETSTACK 10 // incoming thread swappable data (TSD)
179 #define TSTAT_BADSTACK 11 // TSD failed to swap in
180
181 /*
182 *@@ QMODULE16:
183 * DosQProcStat structure for module info
184 */
185
186 typedef struct _QMODULE16
187 {
188 ULONG nextmodule;
189 USHORT modhandle;
190 USHORT modtype;
191 ULONG submodules;
192 ULONG segments;
193 ULONG reserved;
194 ULONG namepointer;
195 USHORT submodule[1]; // varying, see member submodules */
196 } QMODULE16, *PQMODULE16;
197
198 /*
199 *@@ QSEMAPHORE16:
200 * DosQProcStat structure for semaphore info (16-bit only, I guess)
201 */
202
203 typedef struct _QSEMAPHORE16
204 {
205 ULONG nextsem;
206 USHORT owner;
207 UCHAR flag;
208 UCHAR refs;
209 UCHAR requests;
210 UCHAR reserved1;
211 USHORT reserved2;
212 USHORT index;
213 USHORT dummy;
214 UCHAR name[1]; /* varying */
215 } QSEMAPHORE16, *PQSEMAPHORE16;
216
217 /*
218 *@@ QSHAREDMEM16:
219 * DosQProcStat structure for shared memory info
220 */
221
222 typedef struct _QSHAREDMEM16
223 {
224 ULONG nextseg;
225 USHORT handle; // handle for shared memory
226 USHORT selector; // shared memory selector
227 USHORT refs; // reference count
228 UCHAR name[1]; // varying
229 } QSHAREDMEM16, *PQSHAREDMEM16;
230
231 /********************************************************************
232 *
233 * DosQuerySysState declarations (32-bit)
234 *
235 ********************************************************************/
236
237 #define QS32_PROCESS 0x0001
238 #define QS32_SEMAPHORE 0x0002
239 #define QS32_MTE 0x0004
240 #define QS32_FILESYS 0x0008
241 #define QS32_SHMEMORY 0x0010
242 #define QS32_DISK 0x0020
243 #define QS32_HWCONFIG 0x0040
244 #define QS32_NAMEDPIPE 0x0080
245 #define QS32_THREAD 0x0100
246 #define QS32_MODVER 0x0200
247
248 #define QS32_STANDARD (QS32_PROCESS | QS32_SEMAPHORE | QS32_MTE | QS32_FILESYS | QS32_SHMEMORY)
249
250 APIRET APIENTRY DosQuerySysState(ULONG flQueries,
251 ULONG arg1,
252 ULONG arg2,
253 ULONG _res_,
254 PVOID buf,
255 ULONG bufsz);
256
257 /*
258 *@@ QGLOBAL32:
259 * Pointed to by QTOPLEVEL32.
260 */
261
262 typedef struct _QGLOBAL32
263 {
264 ULONG ulThreadCount; // thread count
265 ULONG ulProcCount; // process count
266 ULONG ulModuleCount; // module count
267 } QGLOBAL32, *PQGLOBAL32;
268
269 /*
270 *@@ QTHREAD32:
271 * Pointed to by QPROCESS32.
272 */
273
274 typedef struct _QTHREAD32
275 {
276 ULONG rectype; // 256 for thread
277 USHORT usTID; // thread ID, process-specific
278 USHORT usSlotID; // slot ID, this identifies the thread to the kernel
279 ULONG ulSleepID; // something the kernel uses for blocking threads
280 ULONG ulPriority; // priority flags
281 ULONG ulSystime; // CPU time spent in system code
282 ULONG ulUsertime; // CPU time spent in user code
283 UCHAR ucState; // one of the following:
284 // -- TSTAT_READY 1
285 // -- TSTAT_BLOCKED 2
286 // -- TSTAT_RUNNING 5
287 // -- TSTAT_LOADED 9
288 UCHAR _reserved1_; /* padding to ULONG */
289 USHORT _reserved2_; /* padding to ULONG */
290 } QTHREAD32, *PQTHREAD32;
291
292 // found the following in the "OS/2 Debugging handbook"
293 // (the identifiers are not official, but invented by
294 // me; V0.9.1 (2000-02-12) [umoeller]):
295 // these are the flags for QFDS32.flFlags
296 #define FSF_CONSOLEINPUT 0x0001 // bit 0
297 #define FSF_CONSOLEOUTPUT 0x0002 // bit 1
298 #define FSF_NULLDEVICE 0x0004 // bit 2
299 #define FSF_CLOCKDEVICE 0x0008 // bit 3
300 // #define FSF_UNUSED1 0x0010 // bit 4
301 #define FSF_RAWMODE 0x0020 // bit 5
302 #define FSF_DEVICEIDNOTDIRTY 0x0040 // bit 6
303 #define FSF_LOCALDEVICE 0x0080 // bit 7
304 #define FSF_NO_SFT_HANDLE_ALLOCTD 0x0100 // bit 8
305 #define FSF_THREAD_BLOCKED_ON_SF 0x0200 // bit 9
306 #define FSF_THREAD_BUSY_ON_SF 0x0400 // bit 10
307 #define FSF_NAMED_PIPE 0x0800 // bit 11
308 #define FSF_SFT_USES_FCB 0x1000 // bit 12
309 #define FSF_IS_PIPE 0x2000 // bit 13;
310 // then bit 11 determines whether this pipe is named or unnamed
311 // #define FSF_UNUSED2 0x4000 // bit 14
312 #define FSF_REMOTE_FILE 0x8000 // bit 15
313 // otherwise local file or device
314
315 /*
316 *@@ QFDS32:
317 * open file entry.
318 * Pointed to by QFILEDATA32.
319 */
320
321 typedef struct _QFDS32
322 {
323 USHORT sfn; // "system file number" of the file.
324 // This is the same as in
325 // the QPROCESS32.pausFds array,
326 // so we can identify files opened
327 // by a process. File handles returned
328 // by DosOpen ("job file numbers", JFN's)
329 // are mapped to SFN's for each process
330 // individually.
331 USHORT usRefCount;
332 ULONG flFlags; // FSF_* flags above
333 ULONG flAccess; // fsOpenMode flags of DosOpen:
334 /* #define OPEN_ACCESS_READONLY 0x0000
335 #define OPEN_ACCESS_WRITEONLY 0x0001
336 #define OPEN_ACCESS_READWRITE 0x0002
337 #define OPEN_SHARE_DENYREADWRITE 0x0010
338 #define OPEN_SHARE_DENYWRITE 0x0020
339 #define OPEN_SHARE_DENYREAD 0x0030
340 #define OPEN_SHARE_DENYNONE 0x0040
341 #define OPEN_FLAGS_NOINHERIT 0x0080
342 #define OPEN_FLAGS_NO_LOCALITY 0x0000
343 #define OPEN_FLAGS_SEQUENTIAL 0x0100
344 #define OPEN_FLAGS_RANDOM 0x0200
345 #define OPEN_FLAGS_RANDOMSEQUENTIAL 0x0300
346 #define OPEN_FLAGS_NO_CACHE 0x1000
347 #define OPEN_FLAGS_FAIL_ON_ERROR 0x2000
348 #define OPEN_FLAGS_WRITE_THROUGH 0x4000
349 #define OPEN_FLAGS_DASD 0x8000
350 #define OPEN_FLAGS_NONSPOOLED 0x00040000
351 #define OPEN_FLAGS_PROTECTED_HANDLE 0x40000000 */
352
353 ULONG ulFileSize; // file size in bytes
354 USHORT hVolume; // "volume handle"; apparently,
355 // this identifies some kernel
356 // structure, it's the same for
357 // files on the same disk
358 USHORT attrib; // attributes:
359 // 0x20: 'A' (archived)
360 // 0x10: 'D' (directory)
361 // 0x08: 'L' (?!?)
362 // 0x04: 'S' (system)
363 // 0x02: 'H' (hidden)
364 // 0x01: 'R' (read-only)
365 USHORT _reserved_;
366 } QFDS32, *PQFDS32;
367
368 /*
369 *@@ QFILEDATA32:
370 * open files linked-list item.
371 *
372 * First item is pointed to by QTOPLEVEL32.
373 */
374
375 typedef struct _QFILEDATA32
376 {
377 ULONG rectype; // 8 for file
378 struct _QFILEDATA32 *pNext;
379 ULONG ulOpenCount;
380 PQFDS32 filedata;
381 char acFilename[1];
382 } QFILEDATA32, *PQFILEDATA32;
383
384 /*
385 *@@ QPROCESS32:
386 * process description structure.
387 *
388 * Pointed to by QTOPLEVEL32.
389 *
390 * Following this structure is an array
391 * of ulPrivSem32Count 32-bit semaphore
392 * descriptions.
393 */
394
395 typedef struct _QPROCESS32
396 {
397 ULONG rectype; // 1 for process
398 PQTHREAD32 pThreads; // thread data array; apperently with usThreadCount items
399 USHORT pid; // process ID
400 USHORT ppid; // parent process ID
401 ULONG ulProgType;
402 // -- 0: Full screen protected mode.
403 // -- 1: Real mode (probably DOS or Windoze).
404 // -- 2: VIO windowable protected mode.
405 // -- 3: Presentation manager protected mode.
406 // -- 4: Detached protected mode.
407 ULONG ulState; // one of the following:
408 // -- STAT_EXITLIST 0x01
409 // -- STAT_EXIT1 0x02
410 // -- STAT_EXITALL 0x04
411 // -- STAT_PARSTAT 0x10
412 // -- STAT_SYNCH 0x20
413 // -- STAT_DYING 0x40
414 // -- STAT_EMBRYO 0x80
415 ULONG sessid; // session ID
416 USHORT usHModule; // module handle of main executable
417 USHORT usThreadCount; // no. of threads
418 ULONG ulPrivSem32Count; // count of 32-bit semaphores
419 ULONG ulPrivSem32s; // should be ptr to 32-bit sems array; 0 always
420 USHORT usSem16Count; // count of 16-bit semaphores in pausSem16 array
421 USHORT usModuleCount; // count of DLLs owned by this process
422 USHORT usShrMemCount; // count of shared memory items
423 USHORT usFdsCount; // count of open files; this is mostly way too large
424 PUSHORT pausSem16; // ptr to array of 16-bit semaphore handles;
425 // has usSem16Count items
426 PUSHORT pausModules; // ptr to array of modules (MTE);
427 // has usModuleCount items
428 PUSHORT pausShrMems; // ptr to array of shared mem items;
429 // has usShrMemCount items
430 PUSHORT pausFds; // ptr to array of file handles;
431 // many of these are pseudo-file handles, but
432 // will be the same as the QFDS32.sfn field,
433 // so open files can be identified.
434 } QPROCESS32, *PQPROCESS32;
435
436 /*
437 *@@ QSEMA32:
438 * Member of QSEM16STRUC32.
439 */
440
441 typedef struct _QSEMA32
442 {
443 struct _QSEMA32 *pNext;
444 USHORT usRefCount;
445 UCHAR ucSysFlags;
446 UCHAR ucSysProcCount;
447 ULONG _reserved1_;
448 USHORT usIndex;
449 CHAR acName[1];
450 } QSEMA32, *PQSEMA32;
451
452 /*
453 *@@ QSEM16STRUC32:
454 * Apparently 16-bit semaphores.
455 *
456 * Pointed to by QTOPLEVEL32.
457 */
458
459 typedef struct _QSEM16STRUC32
460 {
461 ULONG rectype; /**/
462 ULONG _reserved1_;
463 USHORT _reserved2_;
464 USHORT usSysSemIndex;
465 ULONG ulIndex;
466 QSEMA32 sema;
467 } QSEM16STRUC32, *PQSEM16STRUC32;
468
469 /*
470 *@@ QSEM32OWNER32:
471 * Pointed to by QSEM16SMUX32, QSEM16EV32, QSEM16MUX32.
472 */
473
474 typedef struct _QSEM32OWNER32
475 {
476 USHORT pid;
477 USHORT usOpenCount; // or owner?!?
478 } QSEM32OWNER32, *PQSEM32OWNER32;
479
480 /*
481 *@@ QSEM32SMUX32:
482 * member of QSEM32STRUC32.
483 */
484
485 typedef struct _QSEM32SMUX32
486 {
487 PQSEM32OWNER32 pOwner;
488 PCHAR pszName;
489 PVOID semrecs; // array of associated sema's
490 USHORT flags;
491 USHORT semreccnt;
492 USHORT waitcnt;
493 USHORT _reserved_; // padding to ULONG
494 } QSEM32SMUX32, *PQSEM32SMUX32;
495
496 /*
497 *@@ QSEM32EV32:
498 * describes an event semaphore.
499 * Member of QSEM32STRUC32.
500 */
501
502 typedef struct _QSEM32EV32
503 {
504 PQSEM32OWNER32 pOwner;
505 PCHAR pacName;
506 PQSEM32SMUX32 pMux;
507 USHORT flags;
508 USHORT postcnt;
509 } QSEM32EV32, *PQSEM32EV32;
510
511 /*
512 *@@ QSEM32MUX32:
513 * member of QSEM32STRUC32.
514 */
515
516 typedef struct _QSEM32MUX32
517 {
518 PQSEM32OWNER32 pOwner;
519 PCHAR name;
520 PQSEM32SMUX32 mux;
521 USHORT flags;
522 USHORT usRefCount;
523 USHORT thrdnum;
524 USHORT _reserved_; /* padding to ULONG */
525 } QSEM32MUX32, *PQSEM32MUX32;
526
527 /*
528 *@@ QSEM32STRUC32:
529 * apparently describes a 32-bit semaphore.
530 *
531 * Pointed to by QTOPLEVEL32.
532 */
533
534 typedef struct _QSEM32STRUC32
535 {
536 struct _QSEM32STRUC32 *pNext;
537 QSEM32EV32 EventSem;
538 QSEM32MUX32 MuxSem;
539 QSEM32SMUX32 SmuxSem;
540 } QSEM32STRUC32, *PQSEM32STRUC32;
541
542 /*
543 *@@ QSHRMEM32:
544 * describes a shared memory block.
545 *
546 * Pointed to by QTOPLEVEL32.
547 */
548
549 typedef struct _QSHRMEM32
550 {
551 struct _QSHRMEM32 *pNext;
552 USHORT usHandle;
553 USHORT usSelector;
554 USHORT usRefCount;
555 CHAR acName[1];
556 } QSHRMEM32, *PQSHRMEM32;
557
558 /*
559 *@@ QMODULE32:
560 * describes an executable module.
561 *
562 * Pointed to by QTOPLEVEL32.
563 */
564
565 typedef struct _QMODULE32
566 {
567 struct _QMODULE32 *pNext; // next module
568 USHORT usHModule; // module handle
569 USHORT type;
570 ULONG ulRefCount;
571 ULONG ulSegmentCount;
572 PVOID _reserved_;
573 PCHAR pcName; // module name (fully qualified)
574 USHORT ausModRef[1]; // array of module "references";
575 // this has usRefCount items
576 // and holds other modules (imports)
577 } QMODULE32, *PQMODULE32;
578
579 /*
580 *@@ QTOPLEVEL32:
581 * head of the buffer returned by
582 * DosQuerySysState.
583 */
584
585 typedef struct _QTOPLEVEL32
586 {
587 PQGLOBAL32 pGlobalData;
588 PQPROCESS32 pProcessData;
589 PQSEM16STRUC32 pSem16Data;
590 PQSEM32STRUC32 pSem32Data; // not always present!
591 PQSHRMEM32 pShrMemData;
592 PQMODULE32 pModuleData;
593 PVOID _reserved2_;
594 PQFILEDATA32 pFileData; // only present in FP19 or later or W4
595 } QTOPLEVEL32, *PQTOPLEVEL32;
596
597 /********************************************************************
598 *
599 * New procstat.c declarations
600 *
601 ********************************************************************/
602
603 /*
604 *@@ PRCPROCESS:
605 * additional, more lucid structure
606 * filled by prc16QueryProcessInfo.
607 */
608
609 typedef struct _PRCPROCESS
610 {
611 CHAR szModuleName[CCHMAXPATH]; // module name
612 USHORT usPID, // process ID
613 usParentPID, // parent process ID
614 usThreads; // thread count
615 ULONG ulSID; // session ID
616 ULONG ulSessionType;
617 ULONG ulStatus;
618 ULONG ulCPU; // CPU usage (sum of thread data)
619 } PRCPROCESS, *PPRCPROCESS;
620
621 /*
622 *@@ PRCTHREAD:
623 * additional, more lucid structure
624 * filled by prc16QueryThreadInfo.
625 */
626
627 typedef struct _PRCTHREAD
628 {
629 USHORT usTID; // thread ID
630 USHORT usThreadSlotID; // kernel thread slot ID
631 ULONG ulBlockID; // sleep id thread is sleeping on
632 ULONG ulPriority;
633 ULONG ulSysTime;
634 ULONG ulUserTime;
635 UCHAR ucStatus; // see status #define's below
636 } PRCTHREAD, *PPRCTHREAD;
637
638 #pragma pack()
639
640 /********************************************************************
641 *
642 * DosQProcStat (16-bit) interface
643 *
644 ********************************************************************/
645
646 PQPROCSTAT16 prc16GetInfo(APIRET *parc);
647
648 VOID prc16FreeInfo(PQPROCSTAT16 pInfo);
649
650 PQPROCESS16 prc16FindProcessFromName(PQPROCSTAT16 pInfo,
651 const char *pcszName);
652
653 PQPROCESS16 prc16FindProcessFromPID(PQPROCSTAT16 pInfo,
654 ULONG ulPID);
655
656 /********************************************************************
657 *
658 * DosQProcStat (16-bit) helpers
659 *
660 ********************************************************************/
661
662 BOOL prc16QueryProcessInfo(USHORT usPID, PPRCPROCESS pprcp);
663
664 ULONG prc16ForEachProcess(PFNWP pfnwpCallback, HWND hwnd, ULONG ulMsg, MPARAM mp1);
665
666 ULONG prc16QueryThreadCount(USHORT usPID);
667
668 BOOL prc16QueryThreadInfo(USHORT usPID, USHORT usTID, PPRCTHREAD pprct);
669
670 ULONG prc16QueryThreadPriority(USHORT usPID, USHORT usTID);
671
672 /********************************************************************
673 *
674 * DosQuerySysState (32-bit) interface
675 *
676 ********************************************************************/
677
678 PQTOPLEVEL32 prc32GetInfo(APIRET *parc);
679
680 VOID prc32FreeInfo(PQTOPLEVEL32 pInfo);
681
682 PQPROCESS32 prc32FindProcessFromName(PQTOPLEVEL32 pInfo,
683 const char *pcszName);
684
685 PQSEMA32 prc32FindSem16(PQTOPLEVEL32 pInfo,
686 USHORT usSemID);
687
688 PQSEM32STRUC32 prc32FindSem32(PQTOPLEVEL32 pInfo,
689 USHORT usSemID);
690
691 PQSHRMEM32 prc32FindShrMem(PQTOPLEVEL32 pInfo,
692 USHORT usShrMemID);
693
694 PQMODULE32 prc32FindModule(PQTOPLEVEL32 pInfo,
695 USHORT usHModule);
696
697 PQFILEDATA32 prc32FindFileData(PQTOPLEVEL32 pInfo,
698 USHORT usFileID);
699
700#endif
701
702#if __cplusplus
703}
704#endif
705
Note: See TracBrowser for help on using the repository browser.