ICorDebugRegisterSet::GetThreadContext Method
Gets the context of the current thread.
HRESULT GetThreadContext(
[in] ULONG32 contextSize,
[in, out, length_is(contextSize),
size_is(contextSize)] BYTE context[]
);
Parameters
contextSize
[in] The size, in bytes, of the context array.context
[in, out] An array of bytes that compose the Win32 CONTEXT structure for the current platform.
Remarks
The debugger should call this function instead of the Win32 GetThreadContext function, because the thread may be in a "hijacked" state where its context has been temporarily changed. The data returned is a Win32 CONTEXT structure for the current platform.
For non-leaf frames, clients should check which registers are valid by using ICorDebugRegisterSet::GetRegistersAvailable.
Requirements
Platforms: Windows 2000, Windows XP, Windows Server 2003 family
Header: CorDebug.idl
Library: CorGuids.lib
.NET Framework Version: 2.0, 1.1, 1.0