Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Back to ProcessMBS class.
ProcessMBS.CurrentProcessID as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Process | MBS Util Plugin | 10.4 | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No | Desktop, Console & Web |
ProcessMBS.KillProcess(ProcessID as Integer, timeout as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Process | MBS Util Plugin | 10.3 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
Returns -1 if function is not available. Else returns a Mac OS error code where 0 equals "no error".
Returns on Windows:
0 - failed
1 - normal exit
2 - forced exit
The timeout is in milliseconds.
If you kill the main process of a task, this can kill the sub processes, too.
See also:
ProcessMBS.Priority(ProcessID as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Process | MBS Util Plugin | 12.1 | ✅ Yes | ❌ No | ✅ Yes | ❌ No | Desktop, Console & Web |
Value is in the range -20 to 20. The default priority is 0; lower priorities cause more favorable scheduling.
For Windows, please use WinSetPriorityClass and WinGetPriorityClass.
(Read and Write computed property)
See also:
ProcessMBS.WinGetPriorityClass(ProcessID as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Process | MBS Util Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
You can pass ProcessID -1 to get the current process.
This value, together with the priority value of each thread of the process, determines each thread's base priority level.
If the function succeeds, the return value is the priority class of the specified process.
The process's priority class is one of the following values:
Name | Value | Description |
ABOVE_NORMAL_PRIORITY_CLASS | &h00008000 | Process that has priority above NORMAL_PRIORITY_CLASS but below HIGH_PRIORITY_CLASS. |
BELOW_NORMAL_PRIORITY_CLASS | &h00004000 | Process that has priority above IDLE_PRIORITY_CLASS but below NORMAL_PRIORITY_CLASS. |
HIGH_PRIORITY_CLASS | &h00000080 | Process that performs time-critical tasks that must be executed immediately for it to run correctly. The threads of a high-priority class process preempt the threads of normal or idle priority class processes. An example is the Task List, which must respond quickly when called by the user, regardless of the load on the operating system. Use extreme care when using the high-priority class, because a high-priority class CPU-bound application can use nearly all available cycles. |
IDLE_PRIORITY_CLASS | &h00000040 | Process whose threads run only when the system is idle and are preempted by the threads of any process running in a higher priority class. An example is a screen saver. The idle priority class is inherited by child processes. |
NORMAL_PRIORITY_CLASS | &h00000020 | Process with no special scheduling needs. |
REALTIME_PRIORITY_CLASS | &h00000100 | Process that has the highest possible priority. The threads of a real-time priority class process preempt the threads of all other processes, including operating system processes performing important tasks. For example, a real-time process that executes for more than a very brief interval can cause disk caches not to flush or cause the mouse to be unresponsive. |
ProcessMBS.WinSetPriorityClass(ProcessID as Integer, PriorityClass as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Process | MBS Util Plugin | 12.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
You can pass ProcessID -1 to get the current process.
This value together with the priority value of each thread of the process determines each thread's base priority level.
The process's priority class is one of the following values:
Name | Value | Description |
ABOVE_NORMAL_PRIORITY_CLASS | &h00008000 | Process that has priority above NORMAL_PRIORITY_CLASS but below HIGH_PRIORITY_CLASS. |
BELOW_NORMAL_PRIORITY_CLASS | &h00004000 | Process that has priority above IDLE_PRIORITY_CLASS but below NORMAL_PRIORITY_CLASS. |
HIGH_PRIORITY_CLASS | &h00000080 | Process that performs time-critical tasks that must be executed immediately for it to run correctly. The threads of a high-priority class process preempt the threads of normal or idle priority class processes. An example is the Task List, which must respond quickly when called by the user, regardless of the load on the operating system. Use extreme care when using the high-priority class, because a high-priority class CPU-bound application can use nearly all available cycles. |
IDLE_PRIORITY_CLASS | &h00000040 | Process whose threads run only when the system is idle and are preempted by the threads of any process running in a higher priority class. An example is a screen saver. The idle priority class is inherited by child processes. |
NORMAL_PRIORITY_CLASS | &h00000020 | Process with no special scheduling needs. |
REALTIME_PRIORITY_CLASS | &h00000100 | Process that has the highest possible priority. The threads of a real-time priority class process preempt the threads of all other processes, including operating system processes performing important tasks. For example, a real-time process that executes for more than a very brief interval can cause disk caches not to flush or cause the mouse to be unresponsive. |
The items on this page are in the following plugins: MBS Util Plugin.