Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to force reconnection of a network mapped drive?
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00713586
Message ID:
00713657
Views:
24
>>GETDIR() doesn't return remoted mapped drives that are mapped, but not connected, as illustrated by their icon having a red X thru it in Explorer. This happens when the computer is started before the computer with the mapping is started before the computer with the drive.
>>
>>I'd like to show the drive in GETDIR(), by forcing the connection (if possible). If the drive really isn't available, then of course, it shouldn't show.
>>
>>TIA.
>
>Um, a SWAG. Look at WNetRestoreConnectionW() in the networking SDK. Don't know if VFP's DRIVETYPE() function returns a zero or not here if the drive is attached but not available. The function is only available on Win2K/XP and is used in restoring persistent connections defined by the user, so I'm not sure that this is going to do the job for you.

Double-Swag WNetAddConnectionW to create a new connection...
I seem to remember WNetAddConnection or something like that.
- jim durkin

"The universe is a big place, perhaps the biggest." Kurt Vonnegut
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform