Export (0) Print
Expand All

Wow64GetThreadContext function

Retrieves the context of the specified WOW64 thread.

Syntax


BOOL WINAPI Wow64GetThreadContext(
  _In_     HANDLE hThread,
  _Inout_  PWOW64_CONTEXT lpContext
);

Parameters

hThread [in]

A handle to the thread whose context is to be retrieved. The handle must have THREAD_GET_CONTEXT access to the thread. For more information, see Thread Security and Access Rights.

lpContext [in, out]

A WOW64_CONTEXT structure. The caller must initialize the ContextFlags member of this structure.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

This function is used to retrieve the thread context of the specified thread. The function retrieves a selective context based on the value of the ContextFlags member of the context structure. The thread identified by the hThread parameter is typically being debugged, but the function can also operate when the thread is not being debugged.

You cannot get a valid context for a running thread. Use the Wow64SuspendThread function to suspend the thread before calling Wow64GetThreadContext.

If you call Wow64GetThreadContext for the current thread, the function returns successfully; however, the context returned is not valid.

This function is intended for 64-bit applications. It is not supported on 32-bit Windows; such calls fail and set the last error code to ERROR_INVALID_FUNCTION. A 32-bit application can call this function on a WOW64 thread; the result is the same as calling the GetThreadContext function.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Debugging Functions
WOW64_CONTEXT
GetThreadContext
GetXStateFeaturesMask
Wow64SetThreadContext

 

 

Community Additions

ADD
Show:
© 2014 Microsoft