Jump to content

DosQProcStatus: Difference between revisions

From EDM2
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The DosQProcStatus API is a 16 bit API that returns information that summarizes the system resources that are inuse of an OS/2 2.0 system.  
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:
DosQProcStatus reports on the following classes of OS/2 2.0 system resources:
Line 6: Line 6:
* 16 bit System Semaphores
* 16 bit System Semaphores
* Named Shared Memory Segments
* Named Shared Memory Segments


==Prototype==
==Prototype==
  APIRET16 APIENTRY16 DosQProcStatus ( PULONG buffer, USHORT buffer_size ) ;  
  APIRET16 APIENTRY16 DosQProcStatus (PULONG buffer, USHORT buffer_size);


==Linkage Definition==
==Linkage Definition==
Line 21: Line 20:
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.  
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.  
;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==
==Links==
* Information about this function on OS/2 1.x and 2.x [http://crydee.sai.msu.ru/ftproot/pub/comp/os/os2/leo/doc/proc.zip]
* Information about this function on OS/2 1.x and 2.x - {{FileLink|DosQProcStatus_1996-12-08.zip}}
* INF with more information: [https://archive.org/details/os2_94 DOSQPS.ZIP]
* INF with more information: [DOSQPS.ZIP]


[[Category:Dos]]
[[Category:Dos]]

Latest revision as of 04:42, 9 August 2024

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