网站首页  词典首页

请输入您要查询的函数:

 

术语 getexitcodethread
释义 GetExitCodeThread
语法:
C++
BOOL WINAPI GetExitCodeThread(
__in HANDLE hThread,
__out LPDWORD lpExitCode
);
GetExitCodeThread函数
检索指定的线程终止状态。
参数
hThread [in]
句柄到线程。
句柄必须有THREAD_QUERY_INFORMATION或THREAD_QUERY_LIMITED_INFORMATION访问权限。有关更多信息,请参见线程安全和访问权限。
Windows Server 2003和Windows XP/2000操作系统:在处理必须有THREAD_QUERY_INFORMATION访问权限。
lpExitCode [out]
对变量的指针接收线程终止status.For更多信息,请参见备注。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
此函数立即返回。如果指定的线程并没有终止和函数成功,返回的STILL_ACTIVE地位。如果线程已终止和函数成功,返回的状态是下列值之一:
出口值在ExitThread或TerminateThread函数指定。
从线程函数的返回值。
该线程的进程退出值。
重要的GetExitCodeThread函数返回一个有效的错误代码的应用程序中定义的线程后,才终止。因此,应用程序不应使用STILL_ACTIVE作为一个错误代码(259)。如果一个线程返回STILL_ACTIVE(259的错误代码,应用程序),为这个值测试可以解释它的意思是,线程仍在运行,并继续测试的线程完成后,线程终止,这可能把应用进入一个无限循环。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
ExitThread
GetExitCodeProcess
OpenThread
进程和线程函数
TerminateThread
终止线程
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetExitCodeThread Function
Retrieves the termination status of the specified thread.
Syntax
C++
BOOL WINAPI GetExitCodeThread(
__in HANDLE hThread,
__out LPDWORD lpExitCode
);
Parameters
hThread [in]
A handle to the thread.
The handle must have the THREAD_QUERY_INFORMATION or THREAD_QUERY_LIMITED_INFORMATION access right. For more information, see Thread Security and Access Rights .
Windows Server 2003 and Windows XP/2000: The handle must have the THREAD_QUERY_INFORMATION access right.
lpExitCode [out]
A pointer to a variable to receive the thread termination status.For more information, see Remarks.
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 returns immediately. If the specified thread has not terminated and the function succeeds, the status returned is STILL_ACTIVE. If the thread has terminated and the function succeeds, the status returned is one of the following values:
The exit value specified in the ExitThread or TerminateThread function.
The return value from the thread function.
The exit value of the thread's process.
Important The GetExitCodeThread function returns a valid error code defined by the application only after the thread terminates. Therefore, an application should not use STILL_ACTIVE (259) as an error code. If a thread returns STILL_ACTIVE (259) as an error code, applications that test for this value could interpret it to mean that the thread is still running and continue to test for the completion of the thread after the thread has terminated, which could put the application into an infinite loop.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
See Also
ExitThread
GetExitCodeProcess
OpenThread
Process and Thread Functions
TerminateThread
Terminating a Thread
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683190(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:32:08