网站首页  词典首页

请输入您要查询的函数:

 

术语 getqueuedcompletionstatusex
释义 GetQueuedCompletionStatusEx
语法:
C++
BOOL WINAPI GetQueuedCompletionStatusEx(
__in HANDLE CompletionPort,
__out LPOVERLAPPED_ENTRY lpCompletionPortEntries,
__in ULONG ulCount,
__out PULONG ulNumEntriesRemoved,
__in DWORD dwMilliseconds,
__in BOOL fAlertable
);
GetQueuedCompletionStatusEx功能
检索多个项目同时完成端口。它等待等待的I / O与指定的完成端口来完成相关的操作。
出列I / O完成包一次一个,使用GetQueuedCompletionStatus功能。
参数
CompletionPort [in]
一个句柄,完成端口。要创建一个完成端口,使用CreateIoCompletionPort函数。
lpCompletionPortEntries [out]
在投入,前点分配的OVERLAPPED_ENTRY结构的数组。
在输出,收到了OVERLAPPED_ENTRY结构的数组持有的参赛作品。该数组元素的数目是由ulNumEntriesRemoved。
在传输过程中每个I /输出字节,完成一些关键文件,表示上每个I / O发生,重叠结构的地址在每个原始的I / O都在lpCompletionPortEntries数组返回使用。
ulCount [in]
的最大项数删除。
ulNumEntriesRemoved [out]
一个变量,它接收的项数实际删除的指针。
dwMilliseconds的 [in]
的毫秒数,来电者愿意为一个完成数据包等待出现在完成端口。如果一个完成数据包没有出现在指定时间内,该函数超时,返回FALSE,并设置* lpOverlapped为NULL。
如果dwMilliseconds的是无限的,该函数将永远不会超时。如果dwMilliseconds的是零,没有I / O操作出列,函数将时间立即进行。
fAlertable [in]
如果此参数为FALSE,该函数不返回,直到超时时间已过或项检索。
如果该参数为TRUE,没有可用的项目,该函数执行一个报警等待。该线程返回系统队列时,一个I / O完成例程或APC的线程和线程执行的函数。
完成例程进行排队时ReadFileEx或WriteFileEx功能,它被指定已完成,并调用线程的线程发起的行动。排队的APC当您调用QueueUserAPC。
返回值
返回非零(真),如果成功或零(假)以其他方式。
为了获得更多错误信息,调用GetLastError。
备注
此函数相关联与指定的完成端口线程。一个线程可以联系最多的端口之一完成。
这个函数返回TRUE时,至少有一个悬而未决的I / O完成。
这个函数返回FALSE时,没有I / O操作出列。这通常意味着发生了错误处理的参数时对这一呼吁,或者说,CompletionPort处理被关闭或以其他方式无效。 GetLastError函数提供了扩展的错误信息。
如果以GetQueuedCompletionStatusEx调用失败,因为处理与此相关的关闭,该函数返回FALSE,而且GetLastError将返回ERROR_ABANDONED_WAIT_0。
服务器应用程序可能有同样的要求完成端口的GetQueuedCompletionStatusEx函数的几个线程。诸如I / O完成,他们排队这第一口入先出邮购业务。如果一个线程正在积极等待这一呼吁的一个或多个排队的请求完成该线程调用只。
欲了解更多的I / O完成端口的理论,使用信息和相关职能,看到的I / O完成端口。
要求:
client最低支持Vista
server最低支持 Windows Server 2008
HeaderWinBase.h
LibraryKernel32.lib
DLLKernel32.dll
参见
专题概述
文件管理函数
I / O完成端口
使用Windows头

函数
ConnectNamedPipe
CreateIoCompletionPort
的DeviceIoControl
GetQueuedCompletionStatusEx
LockFileEx
ReadFile
PostQueuedCompletionStatus
TransactNamedPipe
WaitCommEvent
WriteFile
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==GetQueuedCompletionStatusEx Function
Retrieves multiple completion port entries simultaneously. It waits for pending I/O operations that are associated with the specified completion port to complete.
To dequeue I/O completion packets one at a time, use the GetQueuedCompletionStatus function.
Syntax
C++
BOOL WINAPI GetQueuedCompletionStatusEx(
__in HANDLE CompletionPort,
__out LPOVERLAPPED_ENTRY lpCompletionPortEntries,
__in ULONG ulCount,
__out PULONG ulNumEntriesRemoved,
__in DWORD dwMilliseconds,
__in BOOL fAlertable
);
Parameters
CompletionPort [in]
A handle to the completion port. To create a completion port, use the CreateIoCompletionPort function.
lpCompletionPortEntries [out]
On input, points to a pre-allocated array of OVERLAPPED_ENTRY structures.
On output, receives an array of OVERLAPPED_ENTRY structures that hold the entries. The number of array elements is provided by ulNumEntriesRemoved.
The number of bytes transferred during each I/O, the completion key that indicates on which file each I/O occurred, and the overlapped structure address used in each original I/O are all returned in the lpCompletionPortEntries array.
ulCount [in]
The maximum number of entries to remove.
ulNumEntriesRemoved [out]
A pointer to a variable that receives the number of entries actually removed.
dwMilliseconds [in]
The number of milliseconds that the caller is willing to wait for a completion packet to appear at the completion port. If a completion packet does not appear within the specified time, the function times out, returns FALSE, and sets *lpOverlapped to NULL.
If dwMilliseconds is INFINITE, the function will never time out. If dwMilliseconds is zero and there is no I/O operation to dequeue, the function will time out immediately.
fAlertable [in]
If this parameter is FALSE, the function does not return until the time-out period has elapsed or an entry is retrieved.
If the parameter is TRUE and there are no available entries, the function performs an alertable wait. The thread returns when the system queues an I/O completion routine or APC to the thread and the thread executes the function.
A completion routine is queued when the ReadFileEx or WriteFileEx function in which it was specified has completed, and the calling thread is the thread that initiated the operation. An APC is queued when you call QueueUserAPC .
Return Value
Returns nonzero (TRUE) if successful or zero (FALSE) otherwise.
To get extended error information, call GetLastError .
Remarks
This function associates a thread with the specified completion port. A thread can be associated with at most one completion port.
This function returns TRUE when at least one pending I/O is completed.
This function returns FALSE when no I/O operation was dequeued. This typically means that an error occurred while processing the parameters to this call, or that the CompletionPort handle was closed or is otherwise invalid. The GetLastError function provides extended error information.
If a call to GetQueuedCompletionStatusEx fails because the handle associated with it is closed, the function returns FALSE and GetLastError will return ERROR_ABANDONED_WAIT_0.
Server applications may have several threads calling the GetQueuedCompletionStatusEx function for the same completion port. As I/O operations complete, they are queued to this port in first-in-first-out order. If a thread is actively waiting on this call, one or more queued requests complete the call for that thread only.
For more information on I/O completion port theory, usage, and associated functions, see I/O Completion Ports .
Requirements
Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008
HeaderWinBase.h
LibraryKernel32.lib
DLLKernel32.dll
See Also
Overview Topics
File Management Functions
I/O Completion Ports
Using the Windows Headers

Functions
ConnectNamedPipe
CreateIoCompletionPort
DeviceIoControl
GetQueuedCompletionStatusEx
LockFileEx
ReadFile
PostQueuedCompletionStatus
TransactNamedPipe
WaitCommEvent
WriteFile
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa364988(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 13:21:04