Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to force reconnection of a network mapped drive?
Message
 
To
04/11/2002 13:48:49
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00713586
Message ID:
00718623
Views:
22
>George
>
>>Remembered drives are just that. In order to reconnect one or more of them you have to use the WSH or one of the WNetAddConnection family of API calls.
>
>I see I've caused confusion by the wording of my original post. It wasn't until I explored this that I learned the correct word is "remembered" but that is the situation I was so badly trying to explain.
>
>I *think* I outta to start a new thread with a better subject, or just tell my client to open Explorer and click on the drive. *s*
>
>Anyway, just to follow up on these suggestions. From the docs, WNetRestoreConnectionW, which you suggested, would seem to be exactly what I want. Here's the text that makes me think so?
>
>WNetRestoreConnectionW is used by Winlogon to restore all persistent drive mappings during the interactive logon process. The function is also called by the Microsoft Windows Shell to reconnect individual drives at the user's request. This can occur, for example, when a drive fails to reconnect at logon and the user double-clicks the drive under the My Computer virtual folder.
>
>> I've got a kludge (by Ed's standards, BTW)of a function that enumerates the remembered drives using WNetOpenEnum() and so on. If you'd like I can post it for you.
>
>Enumerating is one thing, "activating" the connection is another so that's it's available under GETDIR(). I think I might just automate Explorer at this point. (Talk about your kludges.)
>
>BTW, just FYI. WScript.Network.EnumNetworkDrives won't enumerate remembered drives. (Q303209)

Yep, I know.

I see that Ed stepped in and got everything fixed. I don't know why I didn't think about the Unicode part (smacks self with large fish). That's what the "W" indicates.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform