Partilhar via


IDebugProgram2::EnumCodeContexts

Retrieves a list of the code contexts for a given position in a source file.

HRESULT EnumCodeContexts( 
   IDebugDocumentPosition2*  pDocPos,
   IEnumDebugCodeContexts2** ppEnum
);
int EnumCodeContexts( 
   IDebugDocumentPosition2     pDocPos,
   out IEnumDebugCodeContexts2 ppEnum
);

Parameters

Return Value

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

Remarks

This method allows the session debug manager (SDM) or IDE to map a source file position into a code position. More than one code context is returned if the source generates multiple blocks of code (for example, C++ templates).

See Also

Reference

IDebugProgram2

IDebugDocumentPosition2

IEnumDebugCodeContexts2