NAME

Win32::Process - Create and manipulate processes.

SYNOPSIS use Win32::Process; use Win32;

sub ErrorReport{
	print Win32::FormatMessage( Win32::GetLastError() );
}

Win32::Process::Create($ProcessObj,
			"D:\\winnt35\\system32\\notepad.exe",
			"notepad temp.txt",
			0,
			NORMAL_PRIORITY_CLASS,
			".")|| die ErrorReport();

$ProcessObj->Suspend();
$ProcessObj->Resume();
$ProcessObj->Wait(INFINITE);

DESCRIPTION

This module allows for control of processes in Perl.

METHODS

Win32::Process::Create($obj,$appname,$cmdline,$iflags,$cflags,$curdir)

Creates a new process.

    Args:

	$obj		container for process object
	$appname	full path name of executable module
	$cmdline	command line args
	$iflags		flag: inherit calling processes handles or not
	$cflags		flags for creation (see exported vars below)
	$curdir		working dir of new process
Win32::Process::KillProcess($pid, $exitcode)

Terminates any process identified by $pid. The process will exit with $exitcode.

$ProcessObj->Suspend()

Suspend the process associated with the $ProcessObj.

$ProcessObj->Resume()

Resume a suspended process.

$ProcessObj->Kill( $ExitCode )

Kill the associated process, have it die with exit code $ExitCode.

$ProcessObj->GetPriorityClass($class)

Get the priority class of the process.

$ProcessObj->SetPriorityClass( $class )

Set the priority class of the process (see exported values below for options).

$ProcessObj->GetProcessAffinitymask( $processAffinityMask, $systemAffinitymask)

Get the process affinity mask. This is a bitvector in which each bit represents the processors that a process is allowed to run on.

$ProcessObj->SetProcessAffinitymask( $processAffinityMask )

Set the process affinity mask. Only available on Windows NT.

$ProcessObj->GetExitCode( $ExitCode )

Retrieve the exitcode of the process.

$ProcessObj->Wait($Timeout)

Wait for the process to die. forever = INFINITE

$ProcessObj->GetProcessID()

Returns the Process ID.