The following example will query the system for current OS/2 process basic information. Since the query is for the current process, upon return no_of_entries will be set to 1.

#define         INCL_WPOS

APIRET  rc;
ULONG   buffer_length, no_of_entries;
char_buffer[16000];

buffer_length = 16000;
rc = DosQueryProcInfo( QPI_PID, 0, QPI_BASIC, &char_buffer,
                       &buffer_length, &no_of_entries);

if (rc!=0)                              /* If problem print the reason code  */
   {
   printf("DosQueryProcInfo Error: return code = %1d", rc);
   }

return;


[Back: DosQueryProcessInfo - Remarks]
[Next: DosQueryProcessInfo - Topics]