Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getdir() doesn't show network
Message
From
15/04/1998 19:28:38
 
 
To
15/04/1998 16:02:34
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00091896
Message ID:
00092353
Views:
23
>>I guess your desired network directory is not yet mapped into a specific drive (i.e. f:\; g:\ etc.).
>
>You lost me here. How do I map the network into a specific drive?
>And why does GetFile() show the network, and GetDir() doesn't?

A bunch of ways; you can use:

DECLARE INTEGER WNetAddConnection IN Win32API ;
STRING cRemoteUNC, ;
STRING cPassword, ;
STRING cLocalDrive

nMyResult = WNetAddConnection('\\ServerMachine\ShareName\','MyPassword','Z:')

nMyResult should be 0 if the API call succeeds.

You can fire an interactive dialog via:

DECLARE INTEGER WNetConnectionDialog IN Win32API ;
INTEGER nWindowHandle, ;
INTEGER nDialogType

DECLARE INTEGER GetActiveWindow IN Win32API

nMyResult = WNetConnectionDialog(GetActiveWindow(),1)

nMyResult should be 0 if a drive is mapped via the dialog.

Ed
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
Reply
Map
View

Click here to load this message in the networking platform