术语 | getcurrentprocess |
释义 | GetCurrentProcess 语法: C++ HANDLE WINAPI GetCurrentProcess(void); GetCurrentProcess函数 检索伪处理当前进程。 参数 这个函数没有参数。 返回值 返回值是一个伪句柄当前进程。 备注 伪句柄是一个特殊的常量,目前(拉手)-1,这是为当前进程句柄解释。对于未来的操作系统,它是最好的兼容性要求GetCurrentProcess,而不是硬编码此常量的值。调用进程可以使用伪句柄指定它自己的进程每当一个进程句柄是必需的。伪句柄的子进程不继承。 这把手到进程对象PROCESS_ALL_ACCESS访问的权利。有关更多信息,请参见过程的安全性和访问权限。 Windows Server 2003和Windows XP/2000操作系统:这把手的最大访问过程的安全描述符允许的首要进程令牌。 一个进程可以创建一个“真正的”句柄本身是在等其他进程范围内有效,或者可以继承指定其他进程的伪句柄作为源在调用句柄DuplicateHandle函数。一个进程也可以使用OpenProcess函数打开一个真正的句柄本身。 伪句柄不必关闭时,不再需要。调用与伪处理CloseHandle函数没有任何效果。如果伪句柄是由DuplicateHandle重复,重复的处理必须关闭。 实例 有关示例,请参阅创建与重定向输入和输出子进程。 要求: 最低支持:client-Windows 2000专业版 最低支持server-Windows 2000服务器 HeaderWinbase.h(头文件:winuser.h) LibraryKernel32.lib DLLKernel32.dll 参见 CloseHandle DuplicateHandle GetCurrentProcessId GetCurrentThread OpenProcess 进程和线程函数 过程 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==GetCurrentProcess Function Retrieves a pseudo handle for the current process. Syntax C++ HANDLE WINAPI GetCurrentProcess(void); Parameters This function has no parameters. Return Value The return value is a pseudo handle to the current process. Remarks A pseudo handle is a special constant, currently (HANDLE)-1, that is interpreted as the current process handle. For compatibility with future operating systems, it is best to call GetCurrentProcess instead of hard-coding this constant value. The calling process can use a pseudo handle to specify its own process whenever a process handle is required. Pseudo handles are not inherited by child processes. This handle has the PROCESS_ALL_ACCESS access right to the process object. For more information, see Process Security and Access Rights . Windows Server 2003 and Windows XP/2000: This handle has the maximum access allowed by the security descriptor of the process to the primary token of the process. A process can create a "real" handle to itself that is valid in the context of other processes, or that can be inherited by other processes, by specifying the pseudo handle as the source handle in a call to the DuplicateHandle function. A process can also use the OpenProcess function to open a real handle to itself. The pseudo handle need not be closed when it is no longer needed. Calling the CloseHandle function with a pseudo handle has no effect. If the pseudo handle is duplicated by DuplicateHandle, the duplicate handle must be closed. Examples For an example, see Creating a Child Process with Redirected Input and Output . Requirements Minimum supported clientWindows 2000 Professional Minimum supported serverWindows 2000 Server HeaderWinbase.h (include Windows.h) LibraryKernel32.lib DLLKernel32.dll See Also CloseHandle DuplicateHandle GetCurrentProcessId GetCurrentThread OpenProcess Process and Thread Functions Processes Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms683179(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。