术语 | getthreadid |
释义 | GetThreadId 语法: C++ DWORD WINAPI GetThreadId( __in HANDLE Thread ); GetThreadId功能 检索指定线程的线程标识符。 参数 主题 [in] 句柄到线程。句柄必须有THREAD_QUERY_INFORMATION或THREAD_QUERY_LIMITED_INFORMATION访问权限。如需有关访问权限的信息,请参见线程安全和访问权限。 Windows Server 2003中:在处理必须有THREAD_QUERY_INFORMATION访问权限。 返回值 如果函数成功,返回值是指定的线程的线程标识符。 如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。 备注 直到线程终止,它的线程标识符唯一标识的系统。 要编译的应用程序使用此功能,定义_WIN32_WINNT为0x0502或更高版本。有关详细信息,请参阅使用Windows头。 要求: client最低支持Vista 最低支持serverWindows服务器2003 HeaderWinbase.h(头文件:winuser.h) LibraryKernel32.lib DLLKernel32.dll 参见 GetCurrentThreadId GetProcessId GetProcessIdOfThread 进程和线程函数 主题 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==GetThreadId Function Retrieves the thread identifier of the specified thread. Syntax C++ DWORD WINAPI GetThreadId( __in HANDLE Thread ); Parameters Thread [in] A handle to the thread. The handle must have the THREAD_QUERY_INFORMATION or THREAD_QUERY_LIMITED_INFORMATION access right. For more information about access rights, see Thread Security and Access Rights . Windows Server 2003: The handle must have the THREAD_QUERY_INFORMATION access right. Return Value If the function succeeds, the return value is the thread identifier of the specified thread. If the function fails, the return value is zero. To get extended error information, call GetLastError . Remarks Until a thread terminates, its thread identifier uniquely identifies it on the system. To compile an application that uses this function, define _WIN32_WINNT as 0x0502 or later. For more information, see Using the Windows Headers . Requirements Minimum supported clientWindows Vista Minimum supported serverWindows Server 2003 HeaderWinbase.h (include Windows.h) LibraryKernel32.lib DLLKernel32.dll See Also GetCurrentThreadId GetProcessId GetProcessIdOfThread Process and Thread Functions Threads Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms683233(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。