xtd 0.2.0
Loading...
Searching...
No Matches

◆ process_name()

ustring xtd::diagnostics::process::process_name ( ) const

Gets the name of the process.

Returns
The name that the system uses to identify the process to the user.
Exceptions
xtd::invalid_operation_exceptionThere is no process associated with this xtd::diagnostics::process object.
Remarks
The xtd::diagnostics::process::process_name property holds an executable file name, such as Outlook, that does not include the .exe extension or the path. It is helpful for getting and manipulating all the processes that are associated with the same executable file.
You can call xtd::diagnostics::process::get_processes_by_name, passing it an executable file name, to retrieve an array that contains every running instance on the specified computer. You can use this array, for example, to shut down all the running instances of the executable file.