Querying Existing Processes
You can easily get information on running processes through some methods from the Process
class that provide the ability of getting process instances. For example, GetProcesses
returns an array of Process
objects, each one representing a running process whereas GetProcessById
and GetProcessByName
return information on the specified process given the identification number or name, whereas GetCurrentProcess
returns an instance of the Process
class representing the current process. Then the Process
class exposes lots of useful properties for retrieving information, each of them self-explanatory such as ProcessName
, Id
, ExitCode
, Handle
, or HasExited
but also other advanced information properties, such as PageMemorySize ...
Get Visual Basic® 2010 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.