scope (ULONG) - input

      The extent of the priority change.

      The values of this field are shown in the following list:

    • PRTYS_PROCESS
      All the threads of any process.

    • PRTYS_PROCESSTREE
      All the threads of a process and any descendants. The indicated process must be the current process or a process created by the current process. Detached processes may not be specified. The indicated process may have terminated.

    • PRTYS_THREAD
      A single thread of the current process.

    ulClass (ULONG) - input

      Priority class of a process.

      The values of this field are shown in the following list:

    • PRTYC_NOCHANGE No change, leave as is

    • PRTYC_IDLETIME
      Idle-time

    • PRTYC_REGULAR
      Regular

    • PRTYC_TIMECRITICAL
      Time-critical

    • PRTYC_FOREGROUNDSERVER
      Fixed high

    delta (LONG) - input

      Change to apply to the current base priority level of the process.

      This value must range from -31 (PRTYD_MINIMUM) to +31 (PRTYD_MAXIMUM).

    PorTid (ULONG) - input

      A process identifier (scope == PRTYS_PROCESS or PRTYS_PROCESSTREE) or a thread identifier (scope == PRTYS_THREAD).

      If this operand is equal to zero, the current process or thread is assumed.

    ulrc (APIRET) - returns

      Return Code.

      DosSetPriority returns one of the following values:

    • NO_ERROR 303
        ERROR_INVALID_PROCID
      304
        ERROR_INVALID_PDELTA
      305
        ERROR_NOT_DESCENDANT
      307
        ERROR_INVALID_PCLASS
      308
        ERROR_INVALID_SCOPE
      309
        ERROR_INVALID_THREADID
      For a full list of error codes, see Errors.


    [Back] [Next]