dos12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
DosGetPrty (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_DOSPROCESS
 
USHORT DosGetPrty(usScope, pusPriority, pid)
USHORT usScope;     /* thread priority in current process/another process */
PUSHORT pusPriority;/* pointer to variable for priority                   */
USHORT pid;         /* process or thread identifier                       */
 
The DosGetPrty function retrieves the scheduling priority of a specified
thread in the current process or the priority of thread 1 in a specified
process.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
usScope      Specifies whether to retrieve the priority for a thread in the
             current process or the priority of thread 1 in some other
             process.
 
             If the usScope parameter is PRTYS_PROCESS, the DosGetPrty
             function retrieves the priority of thread 1 for the process
             specified by the pid parameter. If thread 1 for that process
             has terminated, the DosGetPrty function returns an error
             value.
 
             If the usScope parameter is PRTYS_THREAD, the function
             retrieves the priority of the thread specified by the pid
             parameter.
 
pusPriority  Points to the variable that receives the scheduling priority of
             the specified thread. The high-order byte is set to the
             priority class; the low-order byte is set to the priority
             level.
 
pid          Specifies a process or thread identifier, depending on the
             value of the usScope parameter. If the pid parameter is 0x0000,
             the DosGetPrty function retrieves the priority for the current
             process or thread.
 
Return Value
 
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
 
     ERROR_INVALID_PROCID
     ERROR_INVALID_SCOPE
     ERROR_INVALID_THREADID
 
See Also
 
DosSetPrty