Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Access a network share
Message
From
28/10/1999 10:16:36
 
 
To
28/10/1999 08:47:51
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00282948
Message ID:
00283031
Views:
26
>Does anybody have Visual FoxPro code that uses API calls to attach to a network drive from a Windows 95 machine?
>

You can download my NETRESOURCE class and CLSHEAP classes from here on UT; NETRESOURCE has an implementation of the WNetAddConnection3() API call that can map printers and shared folders to local devices and drive letters.

The are even simpler ways to do this - the FAQ has examples of how the WNetAddConnection() API call works in it - it's less complex than WNetAddConnection3(), but is also considerably less capable.

The Windows Scripting Host Wscript.Network object has methods that will let you map drives and devices, and it uses a COM interface, which is considerably more intuitive. In order to use it, you need to install the WSH on each target system; it's built into Win98 and Win2K, and can be added to WinNT 4 and Win95 by installing IE4 or later, or by installing the self-installing, redistributable executable that can be downloaded from msdn.microsoft.com/scripting on anything but bare, original Win95 (you need at least Win95 SP1) or WinNT prior to SP3 (current is SP5, with SP6 in testing.)

The WSH adds considerably more capability than just mapping drives - there are whitepapers and complete docs on the WSH at the MSDN site.

>Many thanks in advance.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform