[Toc][Index]

DosGetPrty


Bindings:  C, MASM 

This call gets the priority of the initial thread of execution for any 
process, or any thread in the current process. 
 DosGetPrty    (Scope, Priority, ID) 
 
 Scope (USHORT) - input 
    Scope of priority request. Used to define the scope of the request. 
    Value     Definition 
    0         Thread 1 (the initial thread of execution) of the indicated 
              process. 
    2         Any thread of the current process. 
 Priority (PUSHORT) - output 
    Address of the base priority of the thread identified by ID. The 
    high-order byte of this word is set equal to the priority class.  The 
    low-order byte is set equal to the priority level. 
 ID (USHORT) - input 
    A process ID (scope = 0) or a thread ID (scope = 2).  If this operand 
    is equal to 0, the current process or thread is assumed. 
 rc (USHORT) - return 
    Return code descriptions are: 
    0         NO_ERROR 
    303       ERROR_INVALID_PROCID 
    308       ERROR_INVALID_SCOPE 
    309       ERROR_INVALID_THREADID 
 
 Remarks 
 If scope = 0 (process) the priority of the first thread of a process is 
 returned.  If that thread has terminated, the ERROR_INVALID_THREAD_ID 
 error code is returned. 
 A thread's priority is changed by issuing DosSetPrty.  A process can 
 change the priority of all the threads of any process whose process ID is 
 known to the thread. It can also change the priority of another thread in 
 its process, or all the threads of the current or a child process, as 
 well as all its descendants. 
 DosGetPID and DosGetPPID are useful for obtaining process and thread IDs. 
 DosGetPID gets the ID of the current thread, the process ID of its 
 current process, or the process ID of the parent process of the current 
 process.  DosGetPPID gets the parent process ID of any specified process. 
 

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs