Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the context of the current thread.
Syntax
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: See .NET supported operating systems.
Header: CorDebug.idl, CorDebug.h
Library: CorGuids.lib
.NET versions: Available since .NET Framework 1.0