Pointers
PIB field pib_pchenv points to the process' environement strings.
Environment Owner id: tkenv (0xff3e).
PIB Process Information Block.
┌────────────────┬──────┬──────┬────┬────────────────────────────────────────┐│Field Name │Offset│Length│Type│Description │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │pib_ulpid │+0 │4 │D │Process I.D. │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │pib_ulppid │+4 │4 │D │Parent process I.D. │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │pib_hmte │+8 │4 │D │Program (.EXE) module handle │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │pib_pchcmd │+c │2 │W │Command line pointer │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │pib_pchenv │+10 │4 │D │Environment pointer │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │pib_flstatus │+14 │4 │D │Process' status bits │ ├────────────────┼──────┼──────┼────┼────────────────────────────────────────┤ │pib_ultype │+18 │4 │D │Process' type code │ └────────────────┴──────┴──────┴────┴────────────────────────────────────────┘
pib_flstatus flag definitions:
┌─────────────┬────────┬──────────────────────────────┐ │Name │Bit Mask│Description │ ├─────────────┼────────┼──────────────────────────────┤ │PS_XITLST │0x01 │Doing ExitList Processing │ ├─────────────┼────────┼──────────────────────────────┤ │PS_XITTH1 │0x02 │Exiting thread 1 │ ├─────────────┼────────┼──────────────────────────────┤ │PS_XITALL │0x04 │The whole process is exiting │ ├─────────────┼────────┼──────────────────────────────┤ │PS_SYNCPARENT│0x10 │Parent cares about termination│ ├─────────────┼────────┼──────────────────────────────┤ │PS_WAITPARENT│0x20 │Parent did an exec-and-wait │ ├─────────────┼────────┼──────────────────────────────┤ │PS_DYING │0x40 │Process is dying │ ├─────────────┼────────┼──────────────────────────────┤ │PS_EMBRYO │0x80 │Process in embryonic state │ └─────────────┴────────┴──────────────────────────────┘
pib_ultype flag definitions:
┌───────────────┬────────┬─────────────────────────┐ │Name │Value │Description │ ├───────────────┼────────┼─────────────────────────┤ │LIS_PT_FULLSCRN│0 │Full screen app. │ ├───────────────┼────────┼─────────────────────────┤ │LIS_PT_REALMODE│1 │Real mode process │ ├───────────────┼────────┼─────────────────────────┤ │PT_VDM │1 │VDM │ ├───────────────┼────────┼─────────────────────────┤ │LIS_PT_VIOWIN │2 │VIO windowable app. │ ├───────────────┼────────┼─────────────────────────┤ │LIS_PT_PRESMGR │3 │Presentation Manager app.│ ├───────────────┼────────┼─────────────────────────┤ │LIS_PT_DETACHED│4 │Detached app. │ └───────────────┴────────┴─────────────────────────┘