网站首页  词典首页

请输入您要查询的函数:

 

术语 getthreadcontext
释义 GetThreadContext
语法:
C++
BOOL WINAPI GetThreadContext(
__in HANDLE hThread,
__inout LPCONTEXT lpContext
);
GetThreadContext函数
检索范围内的指定的线程。
64位应用程序可以检索一个WOW64的使用Wow64GetThreadContext函数线程上下文。
参数
hThread [in]
句柄到线程的上下文要检索。句柄必须THREAD_GET_CONTEXT访问线程。有关更多信息,请参见线程安全和访问权限。
WOW64的:句柄也必须THREAD_QUERY_INFORMATION访问。
lpContext [ in , out ]
甲到一个上下文结构,收到了适当的范围内指定的线程的指针。在这个结构ContextFlags成员值指定一个线程的上下文中哪一部分的检索。结构的背景是非常具体的处理器。参阅处理器WINNT.H中头文件的这个结构的具体定义和任何对准要求。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
这个函数用于检索指定线程的线程上下文。该函数检索的选择性方面对上下文的结构ContextFlags成员的值为基础。由hThread参数确定的线程通常是进行调试,但功能也可以当线程操作不被调试。
您不能让一个正在运行的线程一个有效的范围内。使用SuspendThread函数之前调用GetThreadContext暂停线程。
如果您要求在当前线程GetThreadContext,该函数返回成功,但返回的背景是无效的。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
背景
调试功能
SetThreadContext
SuspendThread
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月30日
==英文原文==GetThreadContext Function
Retrieves the context of the specified thread.
A 64-bit application can retrieve the context of a WOW64 thread using the Wow64GetThreadContext function.
Syntax
C++
BOOL WINAPI GetThreadContext(
__in HANDLE hThread,
__inout LPCONTEXT 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 .
WOW64: The handle must also have THREAD_QUERY_INFORMATION access.
lpContext [in, out]
A pointer to a CONTEXT structure that receives the appropriate context of the specified thread. The value of the ContextFlags member of this structure specifies which portions of a thread's context are retrieved. The CONTEXT structure is highly processor specific. Refer to the WinNt.h header file for processor-specific definitions of this structures and any alignment requirements.
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 SuspendThread function to suspend the thread before calling GetThreadContext.
If you call GetThreadContext for the current thread, the function returns successfully; however, the context returned is not valid.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CONTEXT
Debugging Functions
SetThreadContext
SuspendThread
Send comments about this topic to Microsoft
Build date: 7/30/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms679362(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:26:04