Debugging Tools for Windows

GetRunningProcessDescription

The GetRunningProcessDescription and GetRunningProcessDescriptionWide methods return a description of the process that includes the executable image name, the service names, the MTS package names, and the command line.

HRESULT
  IDebugClient::GetRunningProcessDescription(
    IN ULONG64  Server,
    IN ULONG  SystemId,
    IN ULONG  Flags,
    OUT OPTIONAL PSTR  ExeName,
    IN ULONG  ExeNameSize,
    OUT OPTIONAL PULONG  ActualExeNameSize,
    OUT OPTIONAL PSTR  Description,
    IN ULONG  DescriptionSize,
    OUT OPTIONAL PULONG  ActualDescriptionSize
    );

HRESULT
  IDebugClient3::GetRunningProcessDescriptionWide(
    IN ULONG64  Server,
    IN ULONG  SystemId,
    IN ULONG  Flags,
    OUT OPTIONAL PWSTR  ExeName,
    IN ULONG  ExeNameSize,
    OUT OPTIONAL PULONG  ActualExeNameSize,
    OUT OPTIONAL PWSTR  Description,
    IN ULONG  DescriptionSize,
    OUT OPTIONAL PULONG  ActualDescriptionSize
    );

#ifdef UNICODE
#define GetRunningProcessDescriptionT GetRunningProcessDescriptionWide
#else
#define GetRunningProcessDescriptionT GetRunningProcessDescription
#endif

Parameters

Server
Specifies the process server to query for the process description. If Server is zero, the engine will query information about the local process directly.
SystemId
Specifies the process ID of the process whose description is desired.
Flags
Specifies a bit-set containing options that affect the behavior of this method. Flags can contain the following bit flags:
Flag Description
DEBUG_PROC_DESC_NO_PATHS Return only file names without path names.
DEBUG_PROC_DESC_NO_SERVICES Do not look up service names.
DEBUG_PROC_DESC_NO_MTS_PACKAGES Do not look up MTS package names.
DEBUG_PROC_DESC_NO_COMMAND_LINE



Do not retrieve the command line.

ExeName
Receives the name of the executable file used to start the process. If ExeName is NULL, this information is not returned.
ExeNameSize
Specifies the size in characters of the buffer ExeNameSize.
ActualExeNameSize
Receives the size in characters of the executable file name. If ExeNameSize is NULL, this information is not returned.
Description
Receives extra information about the process, including service names, MTS package names, and the command line. If Description is NULL, this information is not returned.
DescriptionSize
Specifies the size in characters of the buffer Description.
ActualDescriptionSize
Receives the size in characters of the extra information. If ActualDescriptionSize is NULL, this information is not returned.

Return Value

S_OK
The method was successful.
S_FALSE
The method was successful. However, either ExeNameSize or DescriptionSize were smaller than the size of the respective string and the string was truncated to fit inside the buffer.

This method may also return error values. See Return Values for more details.

Interface Version

GetRunningProcessDescription is available in all versions of IDebugClient. GetRunningProcessDescriptionWide is available in IDebugClient3 and later versions.

Comments

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

Headers: Defined in dbgeng.h. Include dbgeng.h.

See Also

GetRunningProcessSystemIds, GetRunningProcessSystemIdByExecutableName, ConnectProcessServer, AttachProcess, CreateProcessAndAttach2

Build machine: CAPEBUILD