PostQueuedCompletionStatus function (ioapiset.h)

Posts an I/O completion packet to an I/O completion port.

Syntax

BOOL PostQueuedCompletionStatus(
  [in]           HANDLE       CompletionPort,
  [in]           DWORD        dwNumberOfBytesTransferred,
  [in]           ULONG_PTR    dwCompletionKey,
  [in, optional] LPOVERLAPPED lpOverlapped
);

Parameters

[in] CompletionPort

A handle to an I/O completion port to which the I/O completion packet is to be posted.

[in] dwNumberOfBytesTransferred

The value to be returned through the lpNumberOfBytesTransferred parameter of the GetQueuedCompletionStatus function.

[in] dwCompletionKey

The value to be returned through the lpCompletionKey parameter of the GetQueuedCompletionStatus function.

[in, optional] lpOverlapped

The value to be returned through the lpOverlapped parameter of the GetQueuedCompletionStatus function.

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

The I/O completion packet will satisfy an outstanding call to the GetQueuedCompletionStatus function. This function returns with the three values passed as the second, third, and fourth parameters of the call to PostQueuedCompletionStatus. The system does not use or validate these values. In particular, the lpOverlapped parameter need not point to an OVERLAPPED structure.

In Windows 8 and Windows Server 2012, this function is supported by the following technologies.

Technology Supported
Server Message Block (SMB) 3.0 protocol Yes
SMB 3.0 Transparent Failover (TFO) Yes
SMB 3.0 with Scale-out File Shares (SO) Yes
Cluster Shared Volume File System (CsvFS) Yes
Resilient File System (ReFS) Yes
 

CsvFs will do redirected IO for compressed files.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header ioapiset.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

CreateIoCompletionPort

File Management Functions

GetQueuedCompletionStatus

OVERLAPPED