Return the priority class of a processΒΆ
get_process_priority() |
Return the priority class of a process |
Version >= 6.0.3 |
SYNTAX
get_process_priority(server_name, process_handle)
process_handle is a handle returned by the execute() function.
Returns the priority class of a process or -1 if an error occurs. The value returned is one of the PROCESS_PRIORITY defines in sculptor.h. These are equivalent to the priority classes in the Windows API but are not the values used in that API. Administrator privilege may be needed to retrieve the priority class of a process not started by the calling program.
If server_name is NULL, returns the priority class of the specified local process.
If process_handle is 0, returns the priority class of the named Sculptor server (kfserver/kfservnt process).
If server_name is NULL and process_handle is 0, returns the priority class of the calling program.
EXAMPLE
To get the server priority class:
tmp.ServerProcessPriority = get_process_priority(tmp.ServerName, 0)
RELATED TOPICS |