>>>How do you convert \\ServerName to \\xxx.xx.xx.xx programmatically with VFP?
>>>
>>>I need it in order to convert the path of folder that is mapped to a drive letter (such as X:) from this format: \\ServerName\ShareName\Path to this format: \\xxx.xx.xx.xx\ShareName\Path
>>
>>The command line tool nslookup can do this. Doing it programmatically seems to require calling the Windows DNSQuery function. There is a code sample at
http://fox.wikis.com/wc.dll?Wiki~DNSQuery . I haven't tested it, not sure if it works.
>Hi,
>When I start this procedure from fox.wikis, it errors on line:
> lcDomain = ipaddress(4) + "." + ipaddress(3) + "." + ipaddress(2) + "." + ipaddress(1) + ".IN-ADDR.ARPA"
>since iapddress() contains only 2 elements.
>Do you have a similar experience?
I haven't run or tested the code. The above format is commonly associated with reverse DNS lookup.
I'm not sure of the purpose of the code. It may be to get IP addresses for public Internet hosts. To get private IPs for private hosts, at the very least the code would have to make use of a local (private) DNS server.
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up