IDebugHostModule::GetContext 方法 (dbgmodel.h)

GetContext 方法會傳回符號有效的內容。 雖然這會代表符號所在的偵錯目標和進程/位址空間之類的專案,但可能不是從其他 (方法擷取的內容特定,例如:從 IModelObject) 。

語法

HRESULT GetContext(
  IDebugHostContext **context
);

參數

context

此處會傳回符號所在的主機內容。

傳回值

這個方法會傳回 HRESULT,指出成功或失敗。

備註

程式碼範例

ComPtr<IDebugHostSymbol> spSymbol; /* get a symbol */

ComPtr<IDebugHostContext> spContext;
if (SUCCEEDED(spSymbol->GetContext(&spContext)))
{
    // spContext will contain the context that the symbol is within 
    // (e.g.: session, process)
}

規格需求

需求
標頭 dbgmodel.h

另請參閱

IDebugHostModule 介面