The Whois protocol library provides an interface for requesting
information about an Internet domain name. When a domain name is
registered, the organization that registers the domain must provide
certain contact information along with technical information such
as the primary name servers for that domain. The Whois protocol
enables an application to query a server that provides that
registration information. The Whois library provides an API for
requesting that information and returning it to the program so it
can be displayed or processed.
The first step your application must take is to initialize the
library and then establish a connection. The following functions
are available for use by your application:
WhoisInitialize
Initialize the library and load the Windows Sockets library for the
current process. This must be the first function call the
application makes before calling the other Whois API functions.
WhoisConnect
Connect to the remote host, using either a host name or IP address.
This function returns a client handle which is used in subsequent
calls to the library.
WhoisSearch
Perform a search for a specific domain. The server will return the
results of the search as a text document which provides
registration information for that domain. It is important to note
that different registrars may use different formats when returning
the data, and not all servers return the same type of
information.
WhoisRead
Read the data returned by the server. Your application would
typically call this function in a loop until all of the data has
been read or an error occurs.
WhoisDisconnect
Disconnect from the server and release the memory allocated for
that client session. After this function is called, the client
handle is no longer valid.
WhoisUninitialize
Unload the Windows Sockets library and release any resources that
have been allocated for the current process. This is the last
function call the application should make prior to terminating.