Basic Approach for getxbyy

Most getXbyY functions are translated by the WS2_32.DLL to a WSAServiceLookupBegin/Next/End sequence that uses one of a set of special GUIDs as the service class. These GUIDs identify the type of getXbyYoperation 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 be replaced with offsets that are relative to the start of the blob's data. All values referenced by these pointer fields must, of course, be completely contained within the blob, and all strings are ASCII.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
Unix Manual Pages
Delphi Examples