home *** CD-ROM | disk | FTP | other *** search
- /**********************************************************************
- * MODULE NAME : procstat.h AUTHOR: Rick Fishman *
- * DATE WRITTEN: 2-10-92 *
- * *
- * DESCRIPTION: *
- * *
- * This header file contains the function prototype for the asofyet *
- * undocumented DosQProcStatus API. It also contains the structure *
- * definitions that are used in the buffer that is returned by the *
- * API call. *
- * *
- * In order to invoke DosQProcStatus, your .DEF file must contain *
- * this entry: *
- * *
- * IMPORTS DOSQPROCSTATUS=DOSCALLS.154 *
- * *
- **********************************************************************/
-
- #pragma linkage( DosQProcStatus, far16 pascal )
- USHORT DosQProcStatus( PVOID pvBuf, USHORT cbBuf );
-
- #define PROCESS_END_INDICATOR 3 // Indicates end of process structs
-
- #pragma pack(1)
-
- typedef struct _SUMMARY
- {
- ULONG ulThreadCount; // Number of threads in system
- ULONG ulProcessCount; // Number of processes in system
- ULONG ulModuleCount; // Number of modules in system
-
- } SUMMARY, *PSUMMARY;
-
-
- typedef struct _THREADINFO
- {
- UCHAR uchDontKnow1; //
- UCHAR uchDontKnow2; //
- USHORT usDontKnow3; //
- USHORT tidWithinProcess; // TID within process (TID is 4 bytes!!)
- USHORT tidWithinSystem; // TID within system
- ULONG ulBlockId; // Block ID (?)
- USHORT usPriority; // Priority
- USHORT usDontKnow4; //
- USHORT usDontKnow5; //
- USHORT usDontKnow6; //
- USHORT usDontKnow7; //
- USHORT usDontKnow8; //
- USHORT usThreadStatus; // 2=blocked or ready, 5=running
- USHORT usDontKnow9; //
-
- } THREADINFO, *PTHREADINFO;
-
-
- typedef struct _PROCESSINFO
- {
- ULONG ulEndIndicator; // 1 means not end, 3 means last entry
- PTHREADINFO ptiFirst; // Address of the 1st Thread Control Blk
- USHORT pid; // Process ID (2 bytes - PID is 4 bytes)
- USHORT pidParent; // Parent's process ID
- USHORT usDontKnow2; //
- USHORT usDontKnow3; //
- USHORT usDontKnow4; //
- USHORT usDontKnow5; //
- USHORT idSession; // Session ID
- USHORT usDontKnow6; //
- USHORT hModRef; // Module handle of EXE
- USHORT usThreadCount; // Number of threads in this process
- USHORT usSessionType; // Session type (SSF_TYPE_xx)
- CHAR achDontKnow7[ 6 ]; //
- USHORT usThreadIdCount; // Number of USHORTs in Thread id table?
- USHORT usModCount; // Number of USHORTs in ModHandle table?
- USHORT usUshortCount; // Number of USHORTs in Ushort table?
- USHORT usDontKnow8; //
- ULONG ulThreadIdTableAddr; // Maybe the address of a TID table
- ULONG ulModHandleTableAddr; // Address of a ModHandle table (DLLS?)
- ULONG ulUshortTableAddr; // Address of a table of USHORTs (?)
-
- } PROCESSINFO, *PPROCESSINFO;
-
-
- typedef struct _SEMINFO
- {
- struct _SEMINFO *pNext; // Ptr to next block (NULL on last one)
- USHORT idOwningThread; // ID of owning thread?
- USHORT fsFlags; // (MSB-LSB)
- UCHAR uchReferenceCount; // Number of references
- UCHAR uchRequestCount; // Number of requests
- CHAR achDontKnow1[ 6 ]; //
- USHORT usIndex; // Index (?)
- CHAR szSemName[ 1 ]; // ASCIIZ semaphore name
-
-
- } SEMINFO, *PSEMINFO;
-
- typedef struct _SHRMEMINFO
- {
- struct _SHRMEMINFO *pNext; // Ptr to next block (NULL on last one)
- USHORT usMemHandle; // Shared memory handle (?)
- SEL selMem; // Selector
- USHORT usReferenceCount; // Number of references
- CHAR szMemName[ 1 ]; // ASCIIZ shared memory name
-
- } SHRMEMINFO, *PSHRMEMINFO;
-
-
- typedef struct _MODINFO
- {
- struct _MODINFO *pNext; // Ptr to next block (NULL on last one)
- USHORT hMod; // Module handle
- USHORT usModType; // Module type (0=16bit,1=32bit)
- ULONG ulModRefCount; // Count of module references
- ULONG ulSegmentCount; // Number of segments in module
- ULONG ulDontKnow1; //
- PSZ szModName; // Addr of fully qualified module name
- USHORT usModRef[ 1 ]; // Handles of module references
-
- } MODINFO, *PMODINFO;
-
-
- typedef struct _BUFFHEADER
- {
- PSUMMARY psumm; // SUMMARY section ptr
- PPROCESSINFO ppi; // PROCESS section ptr
- PSEMINFO psi; // SEM section ptr (add 16 to offset)
- PVOID pDontKnow1; //
- PSHRMEMINFO psmi; // SHARED MEMORY section ptr
- PMODINFO pmi; // MODULE section ptr
- PVOID pDontKnow2; //
- PVOID pDontKnow3; //
-
- } BUFFHEADER, *PBUFFHEADER;
-
- #pragma pack()