Compartir a través de


IoCompletionCallback callback function

Applications implement this callback if they call the StartThreadpoolIo function to start a worker thread for the I/O completion object.

The PTP_WIN32_IO_CALLBACK type defines a pointer to this callback function. IoCompletionCallback is a placeholder for the application-defined function name.

Syntax

VOID CALLBACK IoCompletionCallback(
  _Inout_     PTP_CALLBACK_INSTANCE Instance,
  _Inout_opt_ PVOID                 Context,
  _Inout_opt_ PVOID                 Overlapped,
  _In_        ULONG                 IoResult,
  _In_        ULONG_PTR             NumberOfBytesTransferred,
  _Inout_     PTP_IO                Io
);

Parameters

Return value

This function does not return a value.

Remarks

If the file handle bound to the I/O completion object has the notification mode FILE_SKIP_COMPLETION_PORT_ON_SUCCESS and an asynchronous I/O operation returns immediately with success, the I/O completion callback function is not called and threadpool I/O notifications must be canceled. For more information, see CancelThreadpoolIo.

To compile an application that uses this function, define _WIN32_WINNT as 0x0600 or higher.

Requirements

Minimum supported client

Windows Vista [desktop apps | UWP apps]

Minimum supported server

Windows Server 2008 [desktop apps | UWP apps]

Header

WinBase.h on Windows Vista, Windows 7, Windows Server 2008 and Windows Server 2008 R2 (include Windows.h); Threadpoolapiset.h on Windows 8 and Windows Server 2012

See also

StartThreadpoolIo

Thread Pools