网站首页  词典首页

请输入您要查询的函数:

 

术语 wow64suspendthread
释义 Wow64SuspendThread
语法:
C++
DWORD WINAPI Wow64SuspendThread(
__in HANDLE hThread
);
Wow64SuspendThread功能
暂停指定的WOW64的线程。
参数
hThread [in]
句柄的线程被挂起。
句柄必须有THREAD_SUSPEND_RESUME访问权限。有关更多信息,请参见线程安全和访问权限。
返回值
如果函数成功,返回值是线程的前暂停计数,否则,它是(DWORD值)-1。为了获得更多错误信息,使用GetLastError函数。
备注
如果函数成功,在指定的线程的执行暂停线程的挂起计数递增。暂停一个线程会导致线程停止执行用户模式(应用程序)代码。
此功能主要是用来通过调试器使用。它不是为了用于线程同步使用。 Calling Wow64SuspendThread on a thread that owns a synchronization object, such as a mutex or critical section, can lead to a deadlock if the calling thread tries to obtain a synchronization object owned by a suspended thread.为了避免这种状况,在一个应用程序,不是一个调试器的信号另一个线程暂停自己的线程。目标线程的设计必须留意这个信号,并作出适当的反应。
每个线程都有一个暂停计数(并MAXIMUM_SUSPEND_COUNT最大值)。如果暂停计数大于零,该线程被挂起,否则线程并未中止,负责执行的资格。调用Wow64SuspendThread导致目标线程的暂停计数递增。过去的最高试图暂停计数递增而递增的原因计数错误。
该ResumeThread函数递减挂起一个挂起的线程数。
此功能是为64位应用程序。它不支持32位Windows,如调用失败,并设置最后一个错误代码ERROR_INVALID_FUNCTION。一个32位应用程序可以调用线程在WOW64的这个函数,结果是作为调用SuspendThread函数相同。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
进程和线程函数
ResumeThread
暂停线程的执行
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==Wow64SuspendThread Function
Suspends the specified WOW64 thread.
Syntax
C++
DWORD WINAPI Wow64SuspendThread(
__in HANDLE hThread
);
Parameters
hThread [in]
A handle to the thread that is to be suspended.
The handle must have the THREAD_SUSPEND_RESUME access right. For more information, see Thread Security and Access Rights .
Return Value
If the function succeeds, the return value is the thread's previous suspend count; otherwise, it is (DWORD) -1. To get extended error information, use the GetLastError function.
Remarks
If the function succeeds, execution of the specified thread is suspended and the thread's suspend count is incremented. Suspending a thread causes the thread to stop executing user-mode (application) code.
This function is primarily designed for use by debuggers. It is not intended to be used for thread synchronization. Calling Wow64SuspendThread on a thread that owns a synchronization object, such as a mutex or critical section, can lead to a deadlock if the calling thread tries to obtain a synchronization object owned by a suspended thread. To avoid this situation, a thread within an application that is not a debugger should signal the other thread to suspend itself. The target thread must be designed to watch for this signal and respond appropriately.
Each thread has a suspend count (with a maximum value of MAXIMUM_SUSPEND_COUNT). If the suspend count is greater than zero, the thread is suspended; otherwise, the thread is not suspended and is eligible for execution. Calling Wow64SuspendThread causes the target thread's suspend count to be incremented. Attempting to increment past the maximum suspend count causes an error without incrementing the count.
The ResumeThread function decrements the suspend count of a suspended thread.
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 SuspendThread function.
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
Process and Thread Functions
ResumeThread
Suspending Thread Execution
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms687400(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:27:14