Debugging Tools for Windows |
The GetCurrentProcessExecutableName and GetCurrentProcessExecutableNameWide methods return the name of executable file loaded in the current process.
HRESULT
IDebugSystemObjects::GetCurrentProcessExecutableName(
OUT OPTIONAL PSTR Buffer,
IN ULONG BufferSize,
OUT OPTIONAL PULONG ExeSize
);
HRESULT
IDebugSystemObjects4::GetCurrentProcessExecutableNameWide(
OUT OPTIONAL PWSTR Buffer,
IN ULONG BufferSize,
OUT OPTIONAL PULONG ExeSize
);
#ifdef UNICODE
#define GetCurrentProcessExecutableNameT GetCurrentProcessExecutableNameWide
#else
#define GetCurrentProcessExecutableNameT GetCurrentProcessExecutableName
#endif
This method may also return error values. See Return Values for more details.
GetCurrentProcessExecutableName is available in all versions of IDebugSystemObjects. GetCurrentProcessExecutableNameWide is available in IDebugSystemObjects4 and later versions.
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.
Headers: Defined in Dbgeng.h. Include Dbgeng.h.