NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Process.GetProcesses

Creates an array of new Process components, associating them with existing process resources on the specified computer.

Overload List

Creates a new Process component for each process resource on the specified computer.

[Visual Basic] Overloads Public Shared Function GetProcesses(String) As Process ()
[C#] public static Process[] GetProcesses(String);
[C++] public: static Process* GetProcesses(String*) [];
[JScript] public static function GetProcesses(String) : Process[];

Creates a new Process component for each process resource on the local computer.

[Visual Basic] Overloads Public Shared Function GetProcesses() As Process ()
[C#] public static Process[] GetProcesses();
[C++] public: static Process* GetProcesses() [];
[JScript] public static function GetProcesses() : Process[];

Example

We use Notepad and Internet Explorer because they open separate instances of the application in separate windows. Some applications, like Word, can open multiple instances in the same window and hence the same process.

It is most demonstrative to open multiple instances of Notepad and Internet Explorer before executing the code.

See Also

Process Class | Process Members | System.Diagnostics Namespace