Platform SDK: Windows Sockets

Summary of Overlapped Completion Indication Mechanisms in the SPI

The following table summarizes the completion semantics for an overlapped socket, showing the various combination of lpOverlapped, hEvent, and lpCompletionRoutine:

lpOverlapped hEvent lpCompletionRoutine Completion indication
NULL Not applicable Ignored Operation completes synchronously, that is, it behaves as if it were a nonoverlapped socket.
!NULL NULL NULL Operation completes overlapped, but there is no Windows Sockets 2-supported completion mechanism. The completion port mechanism (if supported) may be used in this case, otherwise there will be no completion notification.
!NULL !NULL NULL Operation completes overlapped, notification by signaling event object.
!NULL Ignored NULL Operation completes overlapped, notification by scheduling completion routine.