共用方式為


WSH DLL Function Summary

This topic is obsolete for Windows Server 2003, Windows Vista, and later. Windows Sockets Helper functions ( WSHXxx) are no longer supported.

This summarizes the set of WSHXxx functions that every WSH DLL must export. Each supplier of a new transports can implement these functions in a corresponding WSH DLL according to the features supported by each transport. Windows Sockets treats all WSH DLLs as trusted code. Consequently, any bug in a WSHXxx function manifests itself as bug(s) in Windows Sockets.

The following summarizes the set of functions that must be exported by any transport-specific WSH DLL:

WSHEnumProtocols returns a list of protocols (Windows Sockets PROTOCOL_INFO structures) that the WSH DLL supports.

WSHGetSockaddrType parses a socket address.

WSHGetSocketInformation is called whenever getsockopt is passed an option that Windows Sockets does not explicitly support.

WSHGetWildcardSockaddr is called when Windows Sockets needs to perform an "automatic" bind of a socket.

WSHGetWinsockMapping returns information about the address family, socket type, and protocol parameter triples supported by the WSH DLL.

WSHNotify is called to notify the helper DLL of a state transition.

WSHOpenSocket is called when a socket is opened.

WSHSetSocketInformation is called whenever setsockopt is passed an option that Windows Sockets does not explicitly support.

To support the new Windows Sockets 2 extensions for leaf/root sockets, socket groups, and logical representation of sockets, the following optional functions should be implemented:

WSHAddressToString returns a logical string representation of a socket address that can be used for display purposes.

WSHGetBroadcastSockaddr obtains a valid broadcast address for a socket.

WSHGetProviderGuid returns the GUID that identifies the protocols supported by a helper DLL.

WSHGetWSAProtocolInfo returns a pointer to protocol information for the protocol(s) supported by a helper DLL. This function is only used during setup.

WSHIoctl obtains information or performs actions based on a unique control code.

WSHJoinLeaf performs any protocol-specific actions that must be taken to add a socket to a multipoint session.

WSHOpenSocket2 performs the protocol-specific actions for creating a new socket. If this function is exported, it replaces the WSHOpenSocket function.

WSHStringToAddress converts a logical string representation of a socket address to a SOCKADDR structure.

For more detailed information about these WSHXxx functions, see Windows Sockets Helper Functions.

 

 

Send comments about this topic to Microsoft