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 );;

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

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
    How could I have missed this?