Compartir a través de


IDebugCanStopEvent2::GetCodeContext

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

Gets the code context that describes the location of this event.

Syntax

HRESULT GetCodeContext( 
   IDebugCodeContext2** ppCodeContext
);
int GetCodeContext( 
   out IDebugCodeContext2 ppCodeContext
);

Parameters

ppCodeContext
[out] Returns the IDebugCodeContext2 object that represents the current code location.

Return Value

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

Remarks

For most run-time architectures, a code context can be thought of as an address in a program's execution stream, pointing to a specific instruction.

To get the document context, which is oriented towards lines of source code, call the GetDocumentContext method.

See also