CSimpleDNSClient![]()
[ SimpleDNSResolver | Source | Keywords | Summary | Ancestors | All Members | Descendants ]
![]()
Back to the top of CSimpleDNSClient
This class implements a DNS resolver within a COM object. It relies on a porting of the BIND (Berkeley Internet Name Domain) implementation of DNS.
Back to the top of CSimpleDNSClient
To use this class:
Create an instance of the COMponent
| Call any method of the ISimpleDNSClient interface:
|
Delete instance of COMponent
| |
Back to the top of CSimpleDNSClient
Dim oDNS
Set oDNS = CreateObject("Emmanuel.SimpleDNSClient.1")
Dim requested_name
requested_name = "www.microsoft.com"
Dim found_names
found_names = ""
' Set the server address(es) [optional on Windows NT, mandatory on Win95/98]
oDNS.ServerAddresses = "99.99.99.99"
' Set the separator
oDNS.Separator = ";"
On Error Resume Next
oDNS.GetEmailServers requested_name, found_names
If Err <> 0 Then
MsgBox Err.Description
Else
' Show resolved names (within dialog box)
MsgBox "Found names:" & vbCrLf & vbCrLf & found_names
End If
Back to the top of CSimpleDNSClient
Author Emmanuel KARTMANN
Date Monday 1/31/00 3:52:04 PM
Back to the top of CSimpleDNSClient
Back to the top of CSimpleDNSClient
Purpose: create an instance of the class
Parameters: none (C++ constructor)
Return value : none (C++ constructor)
Description :
SEE ALSO
CSimpleDNSClient()
;
Function is currently defined inline.
Back to the top of CSimpleDNSClient
![]()
STDMETHOD(FindServerAddresses)(VARIANT *pvServerAddresses);
Purpose: return the known DNS server addresses, as configured in your local machine (Windows Registry)
Parameters:
Description : This function reads the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NameServer to find the DNS servers on the local machine.
This function works on Windows NT only.
STDMETHOD(FindServerAddresses)(VARIANT *pvServerAddresses);
Back to the top of CSimpleDNSClient
![]()
STDMETHOD(get_ServerAddresses)( BSTR *pVal);
Purpose: return value of the ServerAddresses property, i.e. the list of DNS servers.
Parameters:
Description : The property ServerAddresses can be set via method put_ServerAddresses().
STDMETHOD(get_ServerAddresses)(/*[out, retval]*/ BSTR *pVal);
Back to the top of CSimpleDNSClient
![]()
STDMETHOD(put_ServerAddresses)( BSTR newVal);
Purpose: set value of the ServerAddresses property, i.e. the list of DNS servers.
Parameters:
Description : The property ServerAddresses can be read via method get_ServerAddresses().
STDMETHOD(put_ServerAddresses)(/*[in]*/ BSTR newVal);
Back to the top of CSimpleDNSClient
Purpose: resolve a name in DNS, i.e. send a request and build a list (string) of results with the server's answer(s).
Parameters:
C_IN: ARPA Internet (default)
| C_CHAOS: Chaos Net at MIT
| C_HS: Hesiod at MIT
| C_ANY: Any class
| |
T_A: host address (IPv4) (default)
| T_NS: authoritative server
| T_MD: mail destination
| T_MF: mail forwarder
| T_CNAME: canonical name
| T_SOA: start of authority zone
| T_MB: mailbox domain name
| T_MG: mail group member
| T_MR: mail rename name
| T_NULL: null resource record
| T_WKS: well known service
| T_PTR: domain name pointer
| T_HINFO: host information
| T_MINFO: mailbox information
| T_MX: mail routing information
| T_TXT: text strings
| T_RP: responsible person
| T_AFSDB: AFS cell database
| T_X25: X_25 calling address
| T_ISDN: ISDN calling address
| T_RT: router
| T_NSAP: NSAP address
| T_NSAP_PTR: reverse NSAP lookup (deprecated)
| T_SIG: security signature
| T_KEY: security key
| T_PX: X.400 mail mapping
| T_GPOS: geographical position (withdrawn)
| T_AAAA: IPv6 Address
| T_LOC: Location Information
| T_NXT: Next Valid Name in Zone
| T_EID: Endpoint identifier
| T_NIMLOC: Nimrod locator
| T_SRV: Server selection
| T_ATMA: ATM Address
| T_NAPTR: Naming Authority PoinTeR
| T_UINFO: user (finger) information (non standard)
| T_UID: user ID (non standard)
| T_GID: group ID (non standard)
| T_UNSPEC: Unspecified format (binary data/non standard)
| T_IXFR: incremental zone transfer
| T_AXFR: transfer zone of authority
| T_MAILB: transfer mailbox records
| T_MAILA: transfer mail agent records
| T_ANY: wildcard match
| |
Return value : HRESULT = S_OK for success, otherwise an error occurred
Description : IP addresses are returned in dotted notation (e.g. "123.123.123.123")
STDMETHOD(Resolve)(/*[in]*/ BSTR BSearchedName, /*[out]*/ VARIANT *pvFoundNames, /*[in, optional, defaultvalue("C_IN")]*/ BSTR BResourceClass, /*[in, optional, defaultvalue("T_A")]*/ BSTR BResourceType);
Back to the top of CSimpleDNSClient
![]()
STDMETHOD(GetEmailServers)( BSTR BDomainName, VARIANT *pvEmailServerNames);
Purpose: get the Email (SMTP) Servers for a given domain
Parameters:
Description : SMTP servers are declared in the DNS database. This function calls method Resolve() with class "C_IN" and type "T_MX" for the given domain; the returned records, if any, consist in the SMTP servers declared for that domain.
STDMETHOD(GetEmailServers)(/*[in, optional, defaultvalue("")]*/ BSTR BDomainName, /*[out]*/ VARIANT *pvEmailServerNames);
Back to the top of CSimpleDNSClient
![]()
STDMETHOD(get_Separator)( BSTR *pVal);
Purpose: return the string used to separate multiple results of method Resolve()
Parameters:
Description :
STDMETHOD(get_Separator)(/*[out, retval]*/ BSTR *pVal);
Back to the top of CSimpleDNSClient
![]()
STDMETHOD(put_Separator)( BSTR newVal);
Purpose: set the string used to separate multiple results of method Resolve()
Parameters:
Description :
STDMETHOD(put_Separator)(/*[in]*/ BSTR newVal);
Back to the top of CSimpleDNSClient
![]()
STDMETHOD(GetDNSDomain)( VARIANT *pvDNSDomainName);
Purpose: returns the DNS domain as defined in machine configuration (Windows Registry).
Parameters:
Description :
STDMETHOD(GetDNSDomain)(/*[out]*/ VARIANT *pvDNSDomainName);
Back to the top of CSimpleDNSClient
Back to the top of CSimpleDNSClient
CComCoClass
| CComObjectRootEx
| IDispatchImpl
| ISupportErrorInfo
| |
Back to the top of CSimpleDNSClient
Back to the top of CSimpleDNSClient
![]()
Report problems to jkotula@stratasys.com