Partager via


IDebugDisassemblyStream2::GetCodeContext

Note

This article applies to Visual Studio 2015. 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

Returns a code context object corresponding to a specified code location identifier.

Syntax

HRESULT GetCodeContext(   
   UINT64               uCodeLocationId,  
   IDebugCodeContext2** ppCodeContext  
);  
int GetCodeContext(   
   ulong                  uCodeLocationId,  
   out IDebugCodeContext2 ppCodeContext  
);  

Parameters

uCodeLocationId
[in] Specifies the code location identifier. See the Remarks section for the GetCodeLocationId method for a description of a code location identifier.

ppCodeContext
[out] Returns an IDebugCodeContext2 object that represents the associated code context.

Return Value

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

Remarks

The code location identifier can be returned from a call to the GetCurrentLocation method and can appear in the DisassemblyData structure.

To convert a code context into a code location identifier, call the GetCodeLocationId method.

See Also

IDebugDisassemblyStream2
IDebugCodeContext2
GetCodeLocationId
GetCurrentLocation
DisassemblyData