Name

CreateProcess( )

Synopsis

Creates a new process and its primary thread.

procHandle, threadHandle, procId, threadId = CreateHandle(ApplicationName,\
                                                       CommandLine,\
                                                       ProcessSecurityAttributes,\
                                                       ThreadSecurityAttributes,\
                                                       bInheritHandles,\
                                                       CreationFlags,\
                                                       Environment,\
                                                       CurrentDirectory,\
                                                       StartupInfo)

Parameters

ApplicationName

The name of the executable that creates the process. This can either be a full path to the executable or just the filename portion. If no path is specified, Windows searches the system path for the process. This parameter may be None, in which case the executable must be specified in the CommandLine parameter.

CommandLine

The command line that executes the program. If the ApplicationName parameter is None, this must also include the name of the executable. If ApplicationName is specified, this contains additional arguments for the executable.

ProcessSecurityAttributes

The security attributes for the new process or None if the current attributes are to be inherited. Security attributes can be created using the win32security module.

ThreadSecurityAttributes

The security attributes for the main thread in the new process or None if the current attributes are to be inherited.

bInheritHandles

A boolean flag indicating if the new process should inherit Windows handles from the creating process. If true (that is, 1), each open handle in the creating process is valid for the new process.

CreationFlags

A set of flags that allow special options to be set for the created ...

Get Python Programming On Win32 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.