Dos32QuerySysState API


DosCalls Entry point

IMPORTS Dos32QuerySysState = DOSCALLS.368

Calling convention

        rc = Dos32QuerySysState(
                        ULONG func,     /* pushed last */
                        ULONG arg1,
                        ULONG pid,
                        ULONG _res_,
                        PVOID buf,
                        ULONG bufsz);   /* pushed first */

Note

Arguments

bufsz (ULONG)
length of buffer passed
buf (PVOID)
buffer for returning data
_res_ (ULONG)
_reserved_, not used currently
pid (ULONG)
see note 1
arg1 (ULONG)
see note 3
func (ULONG)
function code

Sample code (for EMX/gcc 0.9C)

Notes

  1. if pid=0, structure will contain info for all processes in the system. if pid != 0, print only process data for the specified process. This is a faster operation.
    WARNING: This function will work incorrectly with kernels < fixpack 18 (fixed in PJ21173), and may hang the system with such older kernels.
  2. This needs a kernel of fixpack 18 (or later); fix is PJ21178.
  3. the only bit that has a function is 0x04 (bit 2) - it causes a system crash in function SELSelToLa() in the Debug Kernel, don't set it to anything else than 0. According to IBM, this will be fixed by APAR PJ21195.
  4. in the surroundings of the _VR32SysState code, which is the actual handler for DosQProcStatus and DosQuerySysState, a few interesting entry points exist:
  5. (the _qs* routines belong to the QuerySysState subsystem). Unfortunately the corresponding bits in a bitmask for the func arg are excluded and these functions currently point to a NO OP. Watch for future kernels: there may be additional functionality. According to IBM, these functions currently return an error code, and this will probably never change :-(.

    This page was accessed times since Jan 25th, 1996


    Reply to: Holger.Veit@gmd.de