Bewerken

Delen via


PFN_WSK_SEND_MESSAGES callback function (wsk.h)

The WskSendMessages function sends multiple datagrams to a remote transport address.

Syntax

PFN_WSK_SEND_MESSAGES PfnWskSendMessages;

NTSTATUS PfnWskSendMessages(
  [in]                 PWSK_SOCKET Socket,
  [in]                 PWSK_BUF_LIST BufferList,
                       ULONG Flags,
  [in, optional]       PSOCKADDR RemoteAddress,
  [in]                 ULONG ControlInfoLength,
  [In_reads_bytes_opt] PCMSGHDR ControlInfo,
  [in, out]            PIRP Irp
)
{...}

Parameters

[in] Socket

A pointer to a WSK_SOCKET structure that specifies the socket object to send the datagrams from.

[in] BufferList

A pointer to an initialized WSK_BUF_LIST structure that contains the list of datagrams to send.

Flags

[Reserved] This parameter is reserved for system use. A WSK application must set this parameter to zero.

[in, optional] RemoteAddress

A pointer to a structure that specifies the remote transport address to send the datagrams to.

[in] ControlInfoLength

The number of bytes of data in the buffer that is pointed to by the ControlInfo parameter. If there is no control information associated with the datagram, the ControlInfoLength parameter must be zero.

[In_reads_bytes_opt] ControlInfo

A pointer to a buffer that contains control information that is associated with the datagrams that are being sent. The control information data consists of one or more control data objects, each of which begins with a CMSGHDR structure. If there is no control information that is associated with the datagrams, this parameter should be NULL.

ControlInfo may not be supported by all transports.

[in, out] Irp

A pointer to a caller-allocated IRP that the WSK subsystem uses to complete the send operation asynchronously. For more information about using IRPs with WSK functions, see Using IRPs with Winsock Kernel Functions.

Return value

Return code Description
STATUS_SUCCESS The datagrams were successfully sent over the socket. The IRP will be completed with success status. The IoStatus.Information field of the IRP contains the number of bytes that were sent.
STATUS_PENDING The WSK subsystem could not send the datagrams over the socket immediately. The WSK subsystem will complete the IRP after it has sent the datagrams over the socket. The status of the send operation will be returned in the IoStatus.Status field of the IRP. If the operation succeeds, the IoStatus.Information field of the IRP will contain the number of bytes that were sent.
Other status codes An error occurred. The IRP will be completed with failure status.

Requirements

Requirement Value
Minimum supported client Windows 8
Header wsk.h (include wsk.h)

See also

WSK_SOCKET

WSK_BUF_LIST

CMSGHDR

Using IRPs with Winsock Kernel Functions