3.3 Creating a Child Process

The CreateProcess call allows you to name the program to execute by specifying either the pathname of the image file or a command line. If the pathname is used, it can be a fully qualified pathname specifying the drive, a directory path, and the name with extension of a the executable file; or the current drive and current directory can be used by default. If you use a command line, the filename extension can be omitted, in which case .exe is assumed. If the directory path is omitted on the command line, the executable file is searched for in the current directory, the \windows and \windows\system directories, and the paths specified in the “Path” environment variable. If the command line parameter is used in CreateProcess, the pathname parameter should be NULL.