Share via


IDebugProgram2::GetProcess

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Get the process that this program is running in.

Syntax

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

Parameters

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

Return Value

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

Remarks

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