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".
|