Thanks but,
The reason I need IP addresses is because of the network config. A VPN
is used over a DSL network. I have nontice that I can't reference
machines at other locations by UNC (IE can't map a drive) but I can by
IP address. Maybe this is fixable but I'd rather solve it with a more
robust technique.
They use fixed IP addresses to BTW.
The problem I have is that users at location A will be supplied an
address of a file from the a table in the DB (they won't see this of
course) which is then used retrieve the file from location B only if
necessary. Consequently, when the user at location B saves the
reference to the file at location B (They will think they are saving the
file) I need to store the IP of the drive where the file is actually
located so that it can be made available to users at all other locations
and be used by app to know where to get the file from.
Each location needs their own files stored locally (locally as in on the
LAN) for fast access by the client app. Users at other locations will
only need to these files occasionally. But they will need to access them.
I figure this could be difficult to understand from text, so thank you
for your response. Regardless, the link you've provided is very useful
and I have kept the code for future refernce.
Cheers
Mr. Smith
John Mishefske wrote:
Mr. Smith wrote:
Hi All.
I need to be able to determine the IP address a drive letter is mapped
to. When a user selects a file from a file open dialog, They will, as
usual, navigate to the file they want via; Drive letter, folder,
folder etc.
The Windows file open dialog returns this path in the format
C:\folder\folder\file.ext. What I need to know is what is the IP of
the C:\ drive or any drive they select, be it P; U; or whatever.
I need a function or API call that given a drive letter returns the IP
of that drive be it the local machine OR a mapped machine.
Let's see how good we all are... :)
You need a function that returns the UNC name - check out:
http://support.microsoft.com:80/supp...NoWebContent=1
This MSKB article explains a bit more about what you are trying to do...