Compartilhar via


WSACOMPLETION

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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 uMsg

    Message handle context

    Context of the message or handle Event

  • lpOverlapped
    Pointer to a WSAOVERLAPPED structure. lpfnCompletionProc

    Pointer to an application-provided completion routine Port

  • lpOverlapped
    Pointer to a WSAOVERLAPPED structure. hPort

    Handle 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
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

WSANSPIoctl

Other Resources

Windows Sockets