WSHGetWinsockMapping

DWORD
    WSHGetWinsockMapping(
        OUT PWINSOCK_MAPPING  Mapping,
        IN DWORD  MappingLength
        );

WSHGetWinSockMapping returns information about the address family, socket type, and protocol parameter triples supported by this helper DLL.

Parameters

Mapping
Points to a WINSOCK_MAPPING-structured buffer in which WSHGetWinsockMapping returns information that describes the parameters supported by this helper DLL.
MappingLength
Specifies the size in bytes of the buffer at Mapping.

Return Value

WSHGetWinsockMapping returns the number of bytes of WINSOCK_MAPPING information used by this helper DLL. If the given MappingLength is too small, the return value indicates how large a buffer is necessary to contain the helper DLL's WINSOCK_MAPPING information.

Comments

WSHGetWinsockMapping returns information about the types of sockets supported by this helper DLL. The WINSOCK_MAPPING structure is defined as follows:

typedef struct WINSOCK_MAPPING {
    DWORD Rows;
    DWORD Columns;
    struct {
        DWORD AddressFamily;
        DWORD SocketType;
        DWORD Protocol;
    } Mapping[1];
} WINSOCK_MAPPING, *PWINSOCK_MAPPING;
 

Members of this structure contain the following information:

Rows
Specifies the number of entries in the Mapping array.
Columns
Specifies three.
Mapping
Is an array with Rows elements, each of which specifies an address family, socket type, and protocol triple supported by the helper DLL.

The Mapping returned should be exactly the same as the value stored under the transport driver's ..Parameters\Winsock registry key for Mapping. The setup utility routines mentioned in the Network Driver Design Guide actually call WSHGetWinsockMapping to obtain the mapping information to be written into the registry.