home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / status1.zip / STATUS.H < prev    next >
Text File  |  1989-11-28  |  6KB  |  110 lines

  1. /*****************************************************************************
  2. **                    STATUS.H - Display OS/2 Resources                     **
  3. **                      Level 00 - November 27th, 1989.                     **
  4. *****************************************************************************/
  5.  
  6. #define TYPE_PID   (0)                 // Record Type 0 - Process Info
  7. #define TYPE_TID   (1)                 // Record Type 1 - Thread Info
  8. #define TYPE_MOD   (2)                 // Record Type 2 - Module Info
  9. #define TYPE_SEM   (3)                 // Record Type 3 - Semaphore Info
  10. #define TYPE_MEM   (4)                 // Record Type 4 - Memory Info
  11. #define TYPE_END   (0xffff)            // End Of List
  12.  
  13. /********************************************************************
  14. **             Define Record To Map Process Information            **
  15. ********************************************************************/
  16. typedef struct _TYPE0                  // Type 0 - Process Information
  17.   {
  18.     PID     ProcessID;                 // Process ID
  19.     PID     ParentPID;                 // Parent Process ID
  20.     UCHAR   SessionID;                 // OS/2 Session ID
  21.     UCHAR   Unknown_1;                 // Unknown Byte
  22.     HMODULE ModID;                     // Module ID
  23.     USHORT  List_1_Offset;             // Offset to List #1 (USHORT)
  24.     USHORT  List_1_Count;              // Number Of Entries In List #1
  25.     USHORT  List_2_Offset;             // Offset to List #2 (USHORT)
  26.     USHORT  List_2_Count;              // Number Of Entries In List #2
  27.     USHORT  List_3_Offset;             // Offset to List #3 (USHORT)
  28.     USHORT  List_3_Count;              // Number Of Entries In List #3
  29.   } TYPE0;
  30. typedef TYPE0 FAR *PTYPE0;             // Define Pointer
  31.  
  32. /********************************************************************
  33. **             Define Record To Map Thread Information             **
  34. ********************************************************************/
  35. typedef struct _TYPE1                  // Type 1 - Thread Information
  36.   {
  37.     UCHAR   SysThreadID;               // System Thread ID
  38.     UCHAR   Unknown;                   // Unknown Byte
  39.     PID     ProcessID;                 // Process ID of Thread
  40.     TID     ThreadID;                  // Thread ID
  41.     USHORT  Priority;                  // Thread Priority
  42.     USHORT  Flags;                     // Thread Flags
  43.     ULONG   BlockID;                   // Block ID Of Something
  44.   } TYPE1;
  45. typedef TYPE1 FAR *PTYPE1;             // Define Pointer
  46.  
  47. /********************************************************************
  48. **             Define Record To Map Module Information             **
  49. ********************************************************************/
  50. typedef struct _TYPE2                  // Type 2 - Module Information
  51.   {
  52.     HMODULE ModID;                     // Module ID
  53.     USHORT  MaxDeps;                   // Number of Dependencies
  54.     USHORT  Dep_Offset;                // Offset to Dependency Table
  55.     USHORT  Mod_Name_Offset;           // Offset To Module Name String
  56.     HMODULE Dependencies[1];           // Dependency Table
  57.   } TYPE2;
  58. typedef TYPE2 FAR *PTYPE2;             // Define Pointer
  59.  
  60. /********************************************************************
  61. **        Define Record To Map System Semaphore Information        **
  62. ********************************************************************/
  63. typedef struct _TYPE3                  // Type 3 - System Semaphore
  64.   {
  65.     UCHAR   SysThreadID;               // Owning System Thread ID
  66.     UCHAR   Unknown;                   // Unknown Byte
  67.     UCHAR   RefCount;                  // Reference Count
  68.     UCHAR   ReqCount;                  // Request Count
  69.     USHORT  Flags;                     // Semaphore Flags
  70.     CHAR    SemaphoreName[1];          // System Semaphore Name String
  71.   } TYPE3;
  72. typedef TYPE3 FAR *PTYPE3;             // Define Pointer
  73.  
  74. /********************************************************************
  75. **          Define Record To Map Shared Memory Information         **
  76. ********************************************************************/
  77. typedef struct _TYPE4                  // Type 4 - Shared Memory Segment
  78.   {
  79.     USHORT  Handle;                    // Handle
  80.     SEL     Selector;                  // Selector
  81.     UCHAR   UseCount;                  // Use Counter
  82.     UCHAR   Unknown;                   // Unknown Byte
  83.     CHAR    SegmentName[1];            // Shared Segment Name String
  84.   } TYPE4;
  85. typedef TYPE4 FAR *PTYPE4;             // Define Pointer
  86.  
  87. /********************************************************************
  88. **             Define Record To Map DosQProcStatus Buffer          **
  89. ********************************************************************/
  90. typedef struct _PROC_STATUS            // Define Process Status Type
  91.   {
  92.     USHORT  TypeCode;                  // Data Element Type Code
  93.     USHORT  Next;                      // Offset To Next Element
  94.     union                              // Overlay Data Elements
  95.       {
  96.         TYPE0  Type_0;                 // Type 0 Data Element
  97.         TYPE1  Type_1;                 // Type 1 Data Element
  98.         TYPE2  Type_2;                 // Type 2 Data Element
  99.         TYPE3  Type_3;                 // Type 3 Data Element
  100.         TYPE4  Type_4;                 // Type 4 Data Element
  101.       } Type;
  102.   } PROC_STATUS;
  103. typedef PROC_STATUS FAR *PPROC_STATUS; // Define Pointer
  104.  
  105. /********************************************************************
  106. **                 Define DosQProcStatus API Call                  **
  107. ********************************************************************/
  108. USHORT APIENTRY DosQProcStatus (PVOID, USHORT);
  109.  
  110.