ICorDebugDataTarget::GetThreadContext 方法

返回指定线程的当前线程上下文。

HRESULT GetThreadContext(
       [in] DWORD dwThreadID,
       [in] ULONG32 contextFlags,
       [in] ULONG32 contextSize,
       [out, size_is(contextSize)] BYTE * pContext);

参数

  • dwThreadID
    [in] 要对其上下文进行检索的线程的标识符。 此标识符由操作系统定义。

  • contextFlags
    [in] 一个平台相关的标志的按位组合,这些标志指示应读取的上下文部分。

  • contextSize
    [in] pContext 的大小。

  • pContext
    [out] 将在其中存储线程上下文的缓冲区。

备注

在 Windows 平台上,pContext 必须是适用于 ICorDebugDataTarget::GetPlatform 方法指定的计算机类型的 CONTEXT 结构(在 WinNT.h 中定义)。 contextFlags 必须具有与 CONTEXT 结构的 ContextFlags 字段相同的值。 CONTEXT 结构将因处理器而异;有关详细信息,请参见 WinNT.h 文件。

要求

**平台:**请参见 .NET Framework 系统要求

头文件: CorDebug.idl、CorDebug.h

**库:**CorGuids.lib

**.NET Framework 版本:**4

请参见

参考

ICorDebugDataTarget 接口

其他资源

调试接口

调试(非托管 API 参考)