共用方式為


ICorProfilerInfo::GetThreadContext 方法

取得目前與指定的執行緒有關聯的內容識別。

HRESULT GetThreadContext(
    [in]  ThreadID  threadId,
    [out] ContextID *pContextId);

參數

  • threadId
    [in] 執行緒的 ID。

  • pContextId
    [out] 目前與指定的執行緒有關聯的內容 ID 指標。 如果此執行緒目前沒有關聯的內容,則此函式會傳回 CORPROF_E_DATAINCOMPLETE。

需求

**平台:**請參閱 .NET Framework 系統需求

**標頭:**CorProf.idl、CorProf.h

**程式庫:**CorGuids.lib

**.NET Framework 版本:**4、3.5 SP1、3.5、3.0 SP1、3.0、2.0 SP1、2.0

請參閱

參考

ICorProfilerInfo 介面