IDebugClient4::GetRunningProcessSystemIdByExecutableName method (dbgeng.h)
The GetRunningProcessSystemIdByExecutableName method searches for a process with a given executable file name and return its process ID.
Syntax
HRESULT GetRunningProcessSystemIdByExecutableName(
[in] ULONG64 Server,
[in] PCSTR ExeName,
[in] ULONG Flags,
[out] PULONG Id
);
Parameters
[in] Server
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.
[in] ExeName
Specifies the executable file name for which to search.
[in] Flags
Specifies a bit-set that controls how the executable name is matched. The following flags may be present:
Flag | Description |
---|---|
DEBUG_GET_PROC_FULL_MATCH |
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. |
[out] Id
Receives the process ID of the first process to match ExeName.
Return value
This method may also return error values. See Return Values for more details.
Return code | Description |
---|---|
|
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. |
Remarks
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.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | dbgeng.h (include Dbgeng.h) |