DosQProcStatus

From EDM2
(Redirected from DosQProcStat)
Jump to: navigation, search

The DosQProcStatus API is a 16-bit API that returns information that summarizes the system resources that are in use of an OS/2 2.0 system.

DosQProcStatus reports on the following classes of OS/2 2.0 system resources:

  • Processes and Threads
  • Dynamic Link Library Modules
  • 16 bit System Semaphores
  • Named Shared Memory Segments

Prototype

APIRET16 APIENTRY16 DosQProcStatus (PULONG buffer, USHORT buffer_size);

Linkage Definition

IMPORTS DOSQPROCSTATUS = DOSCALL1.154 

Parameters

PULONG buffer
Address of buffer for results. See DQPS.H for the layout.
USHORT buffer_size
Size of result buffer.

Remarks

This function is a slightly altered version of the function of the same name that was present in OS/2 1.x, and which formed the basis of the PSTAT program. Though it remains a 16-bit function call, returning data formatted for a 16-bit application, it is nonetheless different from the original OS/2 1.x function in that the data structure returned is much more complete and is easier to use.

Note
Because this function remains a 16-bit version, the data buffer provided to it must be allocated with the OBJ_TILED attribute and cannot exceed 64K in size. There are times when 64K is not enough for the entire data structure, in which case the structure is truncated. This can lead to memory access violations upon trying to scan the structure. To avoid this problem you might want to use the DosQuerySysState function instead.

Links

  • Information about this function on OS/2 1.x and 2.x [1]
  • INF with more information: [DOSQPS.ZIP]