The GetRunningProcessSystemIdByExecutableName method searches for a process with a given executable file name and return its process ID.
HRESULT GetRunningProcessSystemIdByExecutableName( ULONG64 Server, PCSTR ExeName, ULONG Flags, PULONG Id );
Specifies the process server to search for the executable name. If Server is zero, the engine will search for the executable name among the processes running on the local computer.
Specifies the executable file name for which to search.
Specifies a bit-set that controls how the executable name is matched. The following flags may be present:
ExeName specifies the full path name of the executable file name.
If this flag is not set, this method will not use path names when searching for the process.
|DEBUG_GET_PROC_ONLY_MATCH||Require that only one process match the executable file name ExeName.|
Receives the process ID of the first process to match ExeName.
This method may also return error values. See Return Values for more details.
||The method was successful.|
||More than one process matched the executable file name in ExeName, and DEBUG_GET_PROC_ONLY_MATCH was set in Flags.|
||No process matched the executable file name in ExeName.|
This method is available only for live user-mode debugging.
For more information about creating and attaching to live user-mode targets, see Live User-Mode Targets.
|Header||dbgeng.h (include Dbgeng.h)|
Send feedback about: