网站首页  词典首页

请输入您要查询的函数:

 

术语 openthread
释义 OpenThread
语法:
C++
HANDLE WINAPI OpenThread(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in DWORD dwThreadId
);
OpenThread功能
打开一个现有的线程对象。
参数
dwDesiredAccess [in]
到线程的对象访问。这探视权,检查对线程的安全描述符。此参数可以是一个或更多的线程访问的权利。
如果调用方已使SeDebugPrivilege特权,请求授予访问权限,不论安全描述符的内容。
bInheritHandle [in]
如果该值为TRUE,进程创建的这一进程将继承处理。否则,该进程不会继承此处理。
dwThreadId [in]
该线程的标识符被打开。
返回值
如果函数成功,返回值是一个开放的句柄指定的线程。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
句柄返回OpenThread可以在任何函数,需要一个句柄,如等待函数的线程,使用,只要您要求适当的访问权限。句柄获准使用线程对象只限于它是在dwDesiredAccess参数指定的范围内。
当您完成手柄,请务必关闭使用CloseHandle函数。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
CloseHandle
GetExitCodeThread
GetThreadContext
进程和线程函数
ResumeThread
SetThreadContext
SetTokenInformation
SuspendThread
TerminateThread
主题
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==OpenThread Function
Opens an existing thread object.
Syntax
C++
HANDLE WINAPI OpenThread(
__in DWORD dwDesiredAccess,
__in BOOL bInheritHandle,
__in DWORD dwThreadId
);
Parameters
dwDesiredAccess [in]
The access to the thread object. This access right is checked against the security descriptor for the thread. This parameter can be one or more of the thread access rights .
If the caller has enabled the SeDebugPrivilege privilege, the requested access is granted regardless of the contents of the security descriptor.
bInheritHandle [in]
If this value is TRUE, processes created by this process will inherit the handle. Otherwise, the processes do not inherit this handle.
dwThreadId [in]
The identifier of the thread to be opened.
Return Value
If the function succeeds, the return value is an open handle to the specified thread.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
The handle returned by OpenThread can be used in any function that requires a handle to a thread, such as the wait functions , provided you requested the appropriate access rights. The handle is granted access to the thread object only to the extent it was specified in the dwDesiredAccess parameter.
When you are finished with the handle, be sure to close it by using the CloseHandle function.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
CloseHandle
GetExitCodeThread
GetThreadContext
Process and Thread Functions
ResumeThread
SetThreadContext
SetTokenInformation
SuspendThread
TerminateThread
Threads
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms684335(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 13:22:43