Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there an API or VFP function to map a directory?
Message
From
05/01/2000 13:08:56
Paul De Niverville
Deniverville Econometric Research Ltd.
Victoria, British Columbia, Canada
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00313316
Message ID:
00313346
Views:
42
Thanks Ed,

I'll have a look.

Paul


>>I need to test if a directory on a server is mapped to the local client workstation and if it is not, I want to create the mapping.
>>
>>For example does my S: drive on the client point to \\MANTIS\public\IMPORT\ on the server.
>>
>>If not, create an S:drive and point to the above server directory.
>>
>
>The UNC assigned to a mapped drive can be retrieved using the Win32 API; I have sample code in the FAQ entry #522 How do I determine the UNC for a mapped drive?
>
>Drive mapping can be done using WNetAddConnection3; there's a sample in my NETSOURCE class, downloadable as file #9502 NETRESOURCE structure class - this relies on my CLSHEAP class, also available in the files section.
>
>If the drive mapping is incoprrect, you need to use WNetCancelConnection2() to release the drive mapping.
>
>The Windows Script Host's Wscript.Network automation object can accomplish these tasks as well, and offer added functionality as well. I'd seriously consider usign the WSH's automation objects rather than the API; you can download detailed inforamtion on the WSH from msdn.micrsooft.com/scripting
Previous
Reply
Map
View

Click here to load this message in the networking platform