Thanks Martin, I can set the process priority OK with
$obj-> SetPriorityClass($priority)
where $priority = 32, 16384 etc.
But I can't make it set Thread Priority to 1, 0, -1 etc.
The doco. says THREAD_PRIORITY_HIGHEST, _IDLE, _LOWEST etc are "exported by default" - how do I use them ?