WSACOMPLETION (Compact 2013)
3/26/2014
This structure specifies completion notification settings for I/O control calls made to a registered namespace.
Syntax
typedef struct _WSACOMPLETION {
WSACOMPLETIONTYPE Type;
union {
struct {
HWND hWnd;
UINT uMsg;
WPARAM context;
} WindowMessage;
struct {
LPWSAOVERLAPPED lpOverlapped;
} Event;
struct {
LPWSAOVERLAPPED lpOverlapped;
LPWSAOVERLAPPED_COMPLETION_ROUTINE lpfnCompletionProc;
} Apc;
struct {
LPWSAOVERLAPPED lpOverlapped;
HANDLE hPort;
ULONG_PTR Key;
} Port;
} Parameters;
} WSACOMPLETION, *PWSACOMPLETION, FAR *LPWSACOMPLETION;
Members
- Type
Type of completion notification required. See Remarks.
- Parameters
Parameters required to complete the callback. The structures within the Parameters union, specify information required for completing the callback of each given type. WindowMessage(This structure must be filled when Type is set to NSP_NOTIFY_HWND)
hWnd
Windows handle uMsgMessage handle context
Context of the message or handle Event
- lpOverlapped
Pointer to a WSAOVERLAPPED structure. Apc
lpOverlapped
Pointer to a WSAOVERLAPPED structure. lpfnCompletionProcPointer to an application-provided completion routine Port
lpOverlapped
Pointer to a WSAOVERLAPPED structure. hPortHandle to the port Key
Pointer to the key Remarks
This structure enables callbacks to be provided in any of the following formats, based on the value provided in Type:
Callback format |
Type value |
---|---|
Polling |
NSP_NOTIFY_IMMEDIATELY |
Window Message |
NSP_NOTIFY_HWND |
Event |
NSP_NOTIFY_EVENT |
APC |
NSP_NOTIFY_APC |
Completion Port |
NSP_NOTIFY_PORT |
For a blocking function, set this structure to null.
Requirements
Header |
winsock2.h |