home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
status1.zip
/
STATUS.H
< prev
next >
Wrap
Text File
|
1989-11-28
|
6KB
|
110 lines
/*****************************************************************************
** STATUS.H - Display OS/2 Resources **
** Level 00 - November 27th, 1989. **
*****************************************************************************/
#define TYPE_PID (0) // Record Type 0 - Process Info
#define TYPE_TID (1) // Record Type 1 - Thread Info
#define TYPE_MOD (2) // Record Type 2 - Module Info
#define TYPE_SEM (3) // Record Type 3 - Semaphore Info
#define TYPE_MEM (4) // Record Type 4 - Memory Info
#define TYPE_END (0xffff) // End Of List
/********************************************************************
** Define Record To Map Process Information **
********************************************************************/
typedef struct _TYPE0 // Type 0 - Process Information
{
PID ProcessID; // Process ID
PID ParentPID; // Parent Process ID
UCHAR SessionID; // OS/2 Session ID
UCHAR Unknown_1; // Unknown Byte
HMODULE ModID; // Module ID
USHORT List_1_Offset; // Offset to List #1 (USHORT)
USHORT List_1_Count; // Number Of Entries In List #1
USHORT List_2_Offset; // Offset to List #2 (USHORT)
USHORT List_2_Count; // Number Of Entries In List #2
USHORT List_3_Offset; // Offset to List #3 (USHORT)
USHORT List_3_Count; // Number Of Entries In List #3
} TYPE0;
typedef TYPE0 FAR *PTYPE0; // Define Pointer
/********************************************************************
** Define Record To Map Thread Information **
********************************************************************/
typedef struct _TYPE1 // Type 1 - Thread Information
{
UCHAR SysThreadID; // System Thread ID
UCHAR Unknown; // Unknown Byte
PID ProcessID; // Process ID of Thread
TID ThreadID; // Thread ID
USHORT Priority; // Thread Priority
USHORT Flags; // Thread Flags
ULONG BlockID; // Block ID Of Something
} TYPE1;
typedef TYPE1 FAR *PTYPE1; // Define Pointer
/********************************************************************
** Define Record To Map Module Information **
********************************************************************/
typedef struct _TYPE2 // Type 2 - Module Information
{
HMODULE ModID; // Module ID
USHORT MaxDeps; // Number of Dependencies
USHORT Dep_Offset; // Offset to Dependency Table
USHORT Mod_Name_Offset; // Offset To Module Name String
HMODULE Dependencies[1]; // Dependency Table
} TYPE2;
typedef TYPE2 FAR *PTYPE2; // Define Pointer
/********************************************************************
** Define Record To Map System Semaphore Information **
********************************************************************/
typedef struct _TYPE3 // Type 3 - System Semaphore
{
UCHAR SysThreadID; // Owning System Thread ID
UCHAR Unknown; // Unknown Byte
UCHAR RefCount; // Reference Count
UCHAR ReqCount; // Request Count
USHORT Flags; // Semaphore Flags
CHAR SemaphoreName[1]; // System Semaphore Name String
} TYPE3;
typedef TYPE3 FAR *PTYPE3; // Define Pointer
/********************************************************************
** Define Record To Map Shared Memory Information **
********************************************************************/
typedef struct _TYPE4 // Type 4 - Shared Memory Segment
{
USHORT Handle; // Handle
SEL Selector; // Selector
UCHAR UseCount; // Use Counter
UCHAR Unknown; // Unknown Byte
CHAR SegmentName[1]; // Shared Segment Name String
} TYPE4;
typedef TYPE4 FAR *PTYPE4; // Define Pointer
/********************************************************************
** Define Record To Map DosQProcStatus Buffer **
********************************************************************/
typedef struct _PROC_STATUS // Define Process Status Type
{
USHORT TypeCode; // Data Element Type Code
USHORT Next; // Offset To Next Element
union // Overlay Data Elements
{
TYPE0 Type_0; // Type 0 Data Element
TYPE1 Type_1; // Type 1 Data Element
TYPE2 Type_2; // Type 2 Data Element
TYPE3 Type_3; // Type 3 Data Element
TYPE4 Type_4; // Type 4 Data Element
} Type;
} PROC_STATUS;
typedef PROC_STATUS FAR *PPROC_STATUS; // Define Pointer
/********************************************************************
** Define DosQProcStatus API Call **
********************************************************************/
USHORT APIENTRY DosQProcStatus (PVOID, USHORT);