Debugging Tools for Windows |
The GetRunningProcessSystemIdByExecutableName and GetRunningProcessSystemIdByExecutableNameWide methods search for a process with a given executable file name and return its process ID.
HRESULT
IDebugClient::GetRunningProcessSystemIdByExecutableName(
IN ULONG64 Server,
IN PCSTR ExeName,
IN ULONG Flags,
OUT PULONG Id
);
HRESULT
IDebugClient3::GetRunningProcessSystemIdByExecutableNameWide(
IN ULONG64 Server,
IN PCWSTR ExeName,
IN ULONG Flags,
OUT PULONG Id
);
#ifdef UNICODE
#define GetRunningProcessSystemIdByExecutableNameT GetRunningProcessSystemIdByExecutableNameWide
#else
#define GetRunningProcessSystemIdByExecutableNameT GetRunningProcessSystemIdByExecutableName
#endif
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. |
This method may also return error values. See Return Values for more details.
GetRunningProcessSystemIdByExecutableName is available in all versions of IDebugClient. GetRunningProcessSystemIdByExecutableNameWide is available in IDebugClient3 and later versions.
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.
Headers: Defined in dbgeng.h. Include dbgeng.h.
GetRunningProcessSystemIds, GetRunningProcessDescription, ConnectProcessServer, AttachProcess, CreateProcessAndAttach2