Process.Start Method
.NET Framework 4
Starts a process resource and associates it with a Process component.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
| Name | Description | |
|---|---|---|
|
Start() | Starts (or reuses) the process resource that is specified by the StartInfo property of this Process component and associates it with the component. |
|
Start(ProcessStartInfo) | Starts the process resource that is specified by the parameter containing process start information (for example, the file name of the process to start) and associates the resource with a new Process component. |
|
Start(String) | Starts a process resource by specifying the name of a document or application file and associates the resource with a new Process component. |
|
Start(String, String) | Starts a process resource by specifying the name of an application and a set of command-line arguments, and associates the resource with a new Process component. |
|
Start(String, String, SecureString, String) | Starts a process resource by specifying the name of an application, a user name, a password, and a domain and associates the resource with a new Process component. |
|
Start(String, String, String, SecureString, String) | Starts a process resource by specifying the name of an application, a set of command-line arguments, a user name, a password, and a domain and associates the resource with a new Process component. |
if UseShellExecute == false
Start uses native Win32 function CreateProcess with bInheritHandle parameter as true. In this case all inheritable handles (such as opened TCP/IP ports as in my case) passed to child process.
Then if parent for some reason terminates, child still has opened handles of the parent, so if parent started by some event again, it can't use same listening port (as it was in my case).
I had to write own implementation of Process.Start to just pass false bInheritHandle param to CreateProcess
- 12/9/2011
- ios29A