INT
WSHSetSocketInformation(
IN PVOID HelperDllSocketContext,
IN SOCKET SocketHandle,
IN HANDLE TdiAddressObjectHandle,
IN HANDLE TdiConnectionObjectHandle,
IN INT Level,
IN INT OptionName,
IN PCHAR OptionValue,
IN INT OptionLength
);
WSHSetSocketInformation is called by the Windows Sockets DLL whenever an application calls setsockopt with an option that Windows Sockets does not explicitly handle.
WSHSetSocketInformation returns zero if it successfully interprets the given option and carries out whatever operation it requires. Otherwise it returns a Windows Sockets error code. If the return value is nonzero, the setsockopt call fails and the error is set to the value returned by WSHSetSocketInformation.
WSHSetSocketInformation can provide support for arbitrary options beyond those defined by Windows Sockets. Certain defined options also are passed to the helper DLL because of the different ways in which transport drivers provide support for these options, in particular for the SO_KEEPALIVE and SO_DONTROUTE options.
Any option passed in an application call to setsockopt that the Windows Sockets DLL does not explicitly support is forwarded to WSHSetSocketInformation. The Windows Sockets DLL relies on each helper DLL to fail calls for which the given option is invalid or unsupported by the helper DLL or underlying transport.