C
void DNSResolve( BYTE* HostName, BYTE Type );
Description
This function attempts to resolve a host name to an IP address. When called, it starts the DNS state machine. Call DNSIsResolved repeatedly to determine if the resolution is complete.
Only one DNS resoultion may be executed at a time. The Hostname must not be modified in memory until the resolution is complete.
Preconditions
DNSBeginUsage returned TRUE on a previous call.
Parameters
Parameters |
Description |
Hostname |
A pointer to the null terminated string specifiying the host for which to resolve an IP. |
DNS_TYPE_A or DNS_TYPE_MX depending on what type of record resolution is desired. |
Returns
None
Remarks
This function requires access to one UDP socket. If none are available, MAX_UDP_SOCKETS may need to be increased.