网站首页  词典首页

请输入您要查询的函数:

 

术语 getexitcodeprocess
释义 GetExitCodeProcess
语法:
C++
BOOL WINAPI GetExitCodeProcess(
__in HANDLE hProcess,
__out LPDWORD lpExitCode
);
GetExitCodeProcess函数
检索指定进程的终止状态。
参数
hProcess [in]
句柄的进程。
句柄必须有PROCESS_QUERY_INFORMATION或PROCESS_QUERY_LIMITED_INFORMATION访问权限。有关更多信息,请参见过程的安全性和访问权限。
Windows Server 2003和Windows XP/2000操作系统:在处理必须有PROCESS_QUERY_INFORMATION访问权。
lpExitCode [out]
对变量的指针得到进程的终止状态。有关更多信息,请参见备注。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
此函数立即返回。如果该进程并没有终止和函数成功,返回的STILL_ACTIVE地位。如果该进程已经终止和函数成功,返回的状态是下列值之一:
出口价值或PRB:ExitProcess期间TerminateProcess函数指定。
从该进程的主要或WinMain函数的返回值。
对于未处理的异常导致进程终止异常值。
重要的GetExitCodeProcess函数返回一个有效的错误代码的应用程序中定义的线程后,才终止。因此,应用程序不应使用STILL_ACTIVE作为一个错误代码(259)。如果一个线程返回STILL_ACTIVE(259的错误代码,应用程序),为这个值测试可以解释它的意思是,线程仍在运行,并继续测试的线程完成后,线程终止,这可能把应用进入一个无限循环。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinbase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
参见
PRB:ExitProcess期间
ExitThread
进程和线程函数
过程
TerminateProcess
终止一个进程
WinMain
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年8月27日
==英文原文==GetExitCodeProcess Function
Retrieves the termination status of the specified process.
Syntax
C++
BOOL WINAPI GetExitCodeProcess(
__in HANDLE hProcess,
__out LPDWORD lpExitCode
);
Parameters
hProcess [in]
A handle to the process.
The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights .
Windows Server 2003 and Windows XP/2000: The handle must have the PROCESS_QUERY_INFORMATION access right.
lpExitCode [out]
A pointer to a variable to receive the process 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 process has not terminated and the function succeeds, the status returned is STILL_ACTIVE. If the process has terminated and the function succeeds, the status returned is one of the following values:
The exit value specified in the ExitProcess or TerminateProcess function.
The return value from the main or WinMain function of the process.
The exception value for an unhandled exception that caused the process to terminate.
Important The GetExitCodeProcess 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
ExitProcess
ExitThread
Process and Thread Functions
Processes
TerminateProcess
Terminating a Process
WinMain
Send comments about this topic to Microsoft
Build date: 8/27/2009
==原始网址==http://msdn.microsoft.com/en-us/library/ms683189(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:29:45