Returns a new System.Diagnostics.Process component, given a process identifier and the name of a computer on the network.
A System.Diagnostics.Process component that is associated with a remote process resource identified by the processId parameter.
Use this method to create a new System.Diagnostics.Process component and associate it with a process resource on a remote computer on the network. The process resource must already exist on the specified computer, because Process.GetProcessById(int, string) does not create a system resource, but rather associates a resource with an application-generated System.Diagnostics.Process component. A process Process.Id can be retrieved only for a process that is currently running on the computer. After the process terminates, Process.GetProcessById(int, string) throws an exception if you pass it an expired identifier.
On any particular computer, the identifier of a process is unique. Process.GetProcessById(int, string) returns one process at most. If you want to get all the processes running a particular application, use Process.GetProcessesByName(string). If multiple processes exist on the computer running the specified application, Process.GetProcessesByName(string) returns an array containing all the associated processes. You can query each of these processes in turn for its identifier. The process identifier can be viewed in the Processes panel of the Windows Task Manager. The PID column displays the process identifier that is assigned to a process.
If you do not specify a machineName, the local computer is used. Alternatively, you can specify the local computer by setting machineName to the value "." or to an empty string ("").