Edit

Share via


IDebugDisassemblyStream2::GetCodeLocationId

Returns a code ___location identifier for a particular code context.

Syntax

int GetCodeLocationId( 
   IDebugCodeContext2 pCodeContext,
   out ulong          puCodeLocationId
);

Parameters

pCodeContext
[in] An IDebugCodeContext2 object to be converted to an identifier.

puCodeLocationId [out] Returns the code ___location identifier. See Remarks.

Return Value

If successful, returns S_OK; otherwise, returns an error code. Returns E_CODE_CONTEXT_OUT_OF_SCOPE if the code context is valid but outside the scope.

Remarks

The code ___location identifier is specific to the debug engine (DE) supporting the disassembly. This ___location identifier is used internally by the DE to track positions in the code and is typically an address or offset of some kind. The only requirement is that if the code context of one ___location is less than the code context of another ___location, then the corresponding code ___location identifier of the first code context must also be less than the code ___location identifier of the second code context.

To retrieve the code context of a code ___location identifier, call the GetCodeContext method.

See also