Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get IP address from server name?
Message
From
10/12/2015 17:46:55
 
 
To
10/12/2015 17:14:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01628818
Message ID:
01628819
Views:
81
>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.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform