IDebugSystemObjects::GetCurrentProcessExecutableName method

The GetCurrentProcessExecutableName method returns the name of executable file loaded in the current process.

Syntax


HRESULT GetCurrentProcessExecutableName(
  [out, optional]  PSTR Buffer,
  [in]             ULONG BufferSize,
  [out, optional]  PULONG ExeSize
);

Parameters

Buffer [out, optional]

Receives the name of the executable file. If Buffer is NULL, this information is not returned.

BufferSize [in]

Specifies the size in characters of the buffer Buffer.

ExeSize [out, optional]

Receives the size in characters of the name of the executable file. If ExeSize is NULL, this information is not returned.

Return value

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

Return codeDescription
S_OK

The method was successful.

S_FALSE

The method was successful. However, the buffer was not large enough to hold the name of the executable file and it was truncated.

 

Remarks

These methods are only available in user-mode debugging.

If the engine cannot determine the name of the executable file, it writes the string "?NoImage?" to the buffer.

For more information about processes, see Threads and Processes.

Requirements

Header

Dbgeng.h (include Dbgeng.h)

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft