术语 | getconsoleprocesslist |
释义 | GetConsoleProcessList 语法: C++ DWORD WINAPI GetConsoleProcessList( __out LPDWORD lpdwProcessList, __in DWORD dwProcessCount ); GetConsoleProcessList功能 检索列表进程附加到当前控制台。 参数 lpdwProcessList [out] 阿一个缓冲区接收成功后的进程标识符数组的指针。在将小于64K的所需的输出缓冲区总大小。 dwProcessCount [in] 该过程可以在lpdwProcessList缓冲区存储标识符的最大数目。 返回值 如果函数成功,返回值小于或等于dwProcessCount,代表人数的进程标识符存储在lpdwProcessList缓冲区。 如果缓冲区太小,无法容纳所有的有效进程标识符,返回值是数组元素所需数目。该函数将存储在缓冲区中没有标识。在这种情况下,使用返回值分配的缓冲区足够大,存储整个列表,并再次调用该函数。 如果返回值是零,函数失败,因为每个主机都至少有一个与之相关的进程。为了获得更多错误信息,调用GetLastError。 备注 要编译的应用程序使用此功能,定义_WIN32_WINNT为0x0501或更高版本。有关详细信息,请参阅使用Windows头。 要求: 最低支持client-Windows XP 最低支持serverWindows服务器2003 HeaderWincon.h(头文件:winuser.h) LibraryKernel32.lib DLLKernel32.dll 参见 AttachConsole 控制台函数 如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com) 生成日期:2009年8月27日 ==英文原文==GetConsoleProcessList Function Retrieves a list of the processes attached to the current console. Syntax C++ DWORD WINAPI GetConsoleProcessList( __out LPDWORD lpdwProcessList, __in DWORD dwProcessCount ); Parameters lpdwProcessList [out] A pointer to a buffer that receives an array of process identifiers upon success. The total size of the output buffer required will be less than 64K. dwProcessCount [in] The maximum number of process identifiers that can be stored in the lpdwProcessList buffer. Return Value If the function succeeds, the return value is less than or equal to dwProcessCount and represents the number of process identifiers stored in the lpdwProcessList buffer. If the buffer is too small to hold all the valid process identifiers, the return value is the required number of array elements. The function will have stored no identifiers in the buffer. In this situation, use the return value to allocate a buffer that is large enough to store the entire list and call the function again. If the return value is zero, the function has failed, because every console has at least one process associated with it. To get extended error information, call GetLastError . Remarks To compile an application that uses this function, define _WIN32_WINNT as 0x0501 or later. For more information, see Using the Windows Headers . Requirements Minimum supported clientWindows XP Minimum supported serverWindows Server 2003 HeaderWincon.h (include Windows.h) LibraryKernel32.lib DLLKernel32.dll See Also AttachConsole Console Functions Send comments about this topic to Microsoft Build date: 8/27/2009 ==原始网址==http://msdn.microsoft.com/en-us/library/ms683170(VS.85).aspx\n |
随便看 |
|
windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。