WSHGetWinsockMapping function

[ This function is obsolete for Windows Server 2003, Windows Vista, and later, and is no longer supported. ]

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

Syntax

DWORD WSHGetWinsockMapping(
  _Out_ PWINSOCK Mapping,
  _In_  DWORD    MappingLength
);

Parameters

  • Mapping [out]
    Pointer to a WINSOCK_MAPPING-structured buffer in which WSHGetWinsockMapping returns information that describes the parameters supported by this helper DLL.

  • MappingLength [in]
    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.

Remarks

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 ..\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.

Requirements

Target platform

Desktop

Header

Wsahelp.h (include Wsahelp.h)

Library

Wshisotp.lib

 

 

Send comments about this topic to Microsoft