Hi Amy,
I'll take you word on the netbios, to lazy to employer a packet sniffer to
validate this.
IPHostEntry hostInfo = Dns.GetHostByAddress is simple a wrapper method
around the winsock procedure gethostbyaddr. Short of getting you hands very
dirty and programming IP directly, you're stuck with this base
functionality.
Also GetHostByAddress can be very slow function to complete because it is
relying on a reverse DNS lookup, if it is performance that's bothering you
and you want a method call that will not block the current process read on.
Try using the asynchronous version of Dns.BeginResolve it will accept an IP
Address and return immediately. Internally it calls GetHostByAddress. This
way your application won't block while waiting for a response from
GetHostByAddress and you can go an do something else, ie; repaint the screen
if using winforms and/or display a progress bar. Eventually when
GetHostByAddress completes you program will be notified by a call back
method.
Please let me know if you require a Dns.BeginResolve code sample.
Regards
Ian
"Amy L." <am**@paxemail.com> wrote in message
news:uX****************@TK2MSFTNGP14.phx.gbl...
When I make the following call:
IPHostEntry hostInfo = Dns.GetHostByAddress( hostIPAddress ) ;
If the PTR (i.e. the IP address to name resolution) does not exist my
program will start making Netbios calls (Name query to the remote host).
The netbios lookup is very undesired.
Is there a way to not perform the netbios query if the PTR record does not
exist?
Amy.