IDebugDisassemblyStream2:: GetCodeLocationId

返回特定代码上下文的代码位置标识符。

HRESULT GetCodeLocationId( 
   IDebugCodeContext2* pCodeContext,
   UINT64*             puCodeLocationId
);
int GetCodeLocationId( 
   IDebugCodeContext2 pCodeContext,
   out ulong          puCodeLocationId
);

参数

  • pCodeContext
    [in] 要转换的 IDebugCodeContext2 对象为标识符。

  • puCodeLocationId
    [out] 返回代码位置标识符。 请参见"备注"。

返回值

如果成功,则返回; S_OK否则,返回错误代码。 ,如果代码上下文有效,但在范围外,返回 E_CODE_CONTEXT_OUT_OF_SCOPE 。

备注

代码位置标识符是特定于支持该反汇编的调试引擎 (DE)。 DE 在内部用于此位置标识符跟踪代码的位置并通常是地址或偏移量某些类型。 唯一的要求是,如果一个位置代码上下文大于另一个位置代码上下文小于,然后第一个代码上下文的相应代码位置标识符的第二个代码上下文中的代码位置标识符还必须小于。

若要检索代码位置标识符的代码上下文,请调用 IDebugDisassemblyStream2:: GetCodeContext 方法。

请参见

参考

IDebugDocumentContext2

IDebugCodeContext2

IDebugDisassemblyStream2:: GetCodeContext