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
- it is: Dos16QprocStatus((16:16)buf,bufsz)
== Dos32QuerySysState(0x17,0,0,0,(0:32)buf,bufsz);
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
- 00000001 process data
- 00000002 semaphore data
- 00000004 module data
- 00000008 file data (see note 2)
- 00000010 named shared memory data
Sample code (for EMX/gcc 0.9C)
Notes
- 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.
- This needs a kernel of fixpack 18 (or later); fix
is PJ21178.
- 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.
- in the surroundings of the _VR32SysState code,
which is the actual handler for DosQProcStatus and DosQuerySysState, a
few interesting entry points exist:
- _qsDisk
- _qsHWConfig
- _qsNamedPipe
(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