Jump to content

DosQuerySysState

From EDM2
Revision as of 05:15, 8 April 2015 by Martini (talk | contribs) (Created page with "==Prototype:== APIRET APIENTRY DosQuerySysState ( ULONG func, ULONG arg1, ULONG pid, ULONG _res_, PVOID buf, ULONG bufsz ) ; ==Linkage Definition:== IMPORTS Dos32QuerySys...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Prototype:

APIRET APIENTRY DosQuerySysState ( ULONG func, ULONG arg1, ULONG pid, ULONG _res_, PVOID buf, ULONG bufsz ) ;

Linkage Definition:

IMPORTS Dos32QuerySysState = DOSCALLS.368 

Parameters:

  • ULONG func Bit flag indicating which data is being requested.
  • ULONG arg1 Reserved. Set to zero always.
  • ULONG pid Process ID. See notes.
  • ULONG _res_ Reserved.
  • ULONG buf Address of buffer for results. See DOSQSS.H for the layout.
  • ULONG bufsz Size of result buffer.

Comments:

This function performs almost exactly the same function as the older DosQProcStat, except that the 64K limit on buffer size has been removed, all addresses are in 0:32 format, and some more information has been added.

The func parameter is a bit array, with the following meanings:

00000001 Process Data 
00000002 Process Semaphores (16-bit only?) 
00000004 Module Data 
00000008 File Data (see notes) 
00000010 Named Shared Memory 

Notes:

(1) The pid parameter allows you to request information for a single process (if non-zero), or for all processes on the system. NOTE: Selection of a single process caused system hangs prior to Warp 3.0 Fixpack 18.

(2) The arg1 parameter must be set to zero, or it may cause a system crash. IBM has reported this problem fixed in APAR PJ21195.

(3) File data is only supported from Warp 3.0 Fixpack 18 onwards.

Examples:

DOSQ - Query Processes 
LSOF - List Open Files