IDebugDisassemblyStream2::GetCodeLocationId
Returns a code location identifier for a particular code context.
HRESULT GetCodeLocationId(
IDebugCodeContext2* pCodeContext,
UINT64* puCodeLocationId
);
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 IDebugDisassemblyStream2::GetCodeContext method.