Platform SDK: Windows Sockets

Basic Approach for getXbyY in the SPI

Most getXbyY functions are translated by Ws2_32.dll to a WSALookupServiceBegin, WSALookupServiceNext, WSALookupServiceEnd sequence that uses one of a set of special GUIDs as the service class. These GUIDs identify the type of getXbyY operation that is being emulated. The query is constrained to those NSPs that support AF_INET. Whenever a getXbyY function returns a HOSTENT or SERVENT structure, the Ws2_32.dll will specify the LUP_RETURN_BLOB flag in WSALookupServiceBegin so that the desired information will be returned by the NSP. These structures must be modified slightly in that the pointers contained within must be replaced with offsets that are relative to the start of the blob's data. All values referenced by these pointer members must, of course, be completely contained within the blob, and all strings are ASCII.