The Whois protocol control 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 control provides an interface
for requesting that information and returning it to the program so
it can be displayed or processed.
The following properties, methods and events are available for
use by your application:
Initialize
Initialize the control and load the Windows Sockets library for the
current process. This method is normally not used if the control is
placed on a form in languages such as Visual Basic. However, if the
control is being created dynamically using a function similar to
CreateObject, then the application must call this method to
initialize the component before setting any properties or calling
any other methods in the control.
Connect
Connect to the remote host, using either a host name or IP address.
Once the connection has been established, the other methods in the
control may be used to retrieve information from the server.
Search
This method submits a search keyword to the server. The keyword may
specify a domain name, a user handle or a user mailbox, depending
on the search type. Note that not all WHOIS servers support all
search types. For example, many servers no longer support searching
for user information based on email addresses.
Read
Read the data returned by the server, storing it in a string
variable or byte array that is specified by the caller. This will
contain the information about the domain specified when the Search
method was called. Note that the data returned will typically be
text, however it may not follow the same end-of-line conventions as
Windows. For example, if the server is a UNIX or Linux system, the
end-of-line may be indicated by a single linefeed, rather than a
carriage-return/linefeed pair. Your application will have to
account for this if the data is being displayed as-is to a
user.
Disconnect
Disconnect from the server and release the memory allocated for
that client session. After this method is called, the client
session is no longer valid.
Uninitialize
Unload the Windows Sockets library and release any resources that
have been allocated for the current process. This is the last
method call that the application should make prior to terminating.
This is only necessary if the application has previously called the
Initialize method.