WSK_SET_STATIC_EVENT_CALLBACKS

A WSK application uses the WSK_SET_STATIC_EVENT_CALLBACKS client control operation to automatically enable certain event callback functions on every socket that it creates. The event callback functions that are enabled in this manner are always enabled and cannot be disabled or re-enabled later by the WSK application. However, if a WSK application always enables certain event callback functions on every socket that it creates, the application should use this method to automatically enable those event callback functions because it will yield much better performance.

If a WSK application uses the WSK_SET_STATIC_EVENT_CALLBACKS client control operation, it must do so before it creates any sockets.

To automatically enable certain event callback functions on every socket it creates, a WSK application calls the WskControlClient function with the following parameters.

Parameter Value

ControlCode

WSK_SET_STATIC_EVENT_CALLBACKS

InputSize

sizeof(WSK_EVENT_CALLBACK_CONTROL)

InputBuffer

A pointer to a WSK_EVENT_CALLBACK_CONTROL structure that specifies the desired event callback functions to be automatically enabled

OutputSize

0

OutputBuffer

NULL

OutputSizeReturned

NULL

Irp

NULL

A WSK application can specify a combination of event flags for different socket types in the EventMask member of the WSK_EVENT_CALLBACK_CONTROL structure. When the WSK application creates a new socket, the WSK subsystem will automatically enable the appropriate event callback functions for the specific category of WSK socket that is being created.

For more information about the event flags for the standard WSK event callback functions, see SO_WSK_EVENT_CALLBACK.

For more information about enabling and disabling a socket's event callback functions, see Enabling and Disabling Event Callback Functions.

The Irp parameter must be NULL for this client control operation.

Requirements

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

Wsk.h (include Wsk.h)