Get the process that this program is running in.


HRESULT GetProcess(
   IDebugProcess2** ppProcess
int GetProcess(
   out IDebugProcess2 ppProcess


[out] Returns the IDebugProcess2 interface that represents the process.

Return Value

If successful, returns S_OK; otherwise, returns an error code.


Unless a debug engine (DE) implements the IDebugEngineLaunch2 interface, the DE's implementation of this method should always return E_NOTIMPL because a DE cannot determine which process it is running in and therefore cannot satisfy an implementation of this method.

Implementing the IDebugEngineLaunch2 interface means that the DE must know how to create a process; therefore, the DE's implementation of the IDebugProgram2 interface is able to know what process it is running in.

See also