in reply to Re^2: Set thread quantum for process under Windows
in thread Set thread quantum for process under Windows
There seems to be no method for creating a Win32::Process object from a pid.
Actually there is:
Win32::Process::Open( $obj, $pid, $iflags );
$pid is an existingprocess id as return by open2(), $obj is a variable you pass in which gets set to a Win32::Process object handle. You can the call ->SetPriority() on that. Eg.
use Win32::Process;; $pid = system 1, 'notepad';; ## The return from open2 should work just + as well. Win32::Process::Open( $o, $pid, 0 );; print $o;; Win32::Process=SCALAR(0x4073208) $o->SetPriorityClass( IDLE_PRIORITY_CLASS );;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Set thread quantum for process under Windows
by chessgui (Scribe) on Jan 05, 2012 at 10:48 UTC |