RE: Reconnect autodisconnected drive mappings
From: Mark (Mark_at_discussions.microsoft.com)
Date: 11/01/04
- Next message: scallejo: "128 Return Code"
- Previous message: Bonj: "Re: debugging"
- In reply to: Michael Russell: "Reconnect autodisconnected drive mappings"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 1 Nov 2004 11:45:02 -0800
Take a look at WNetGetConnection.
Why bother with network drives? You should be able to do the same think
using the path name (\\server\folder).
Mark
"Michael Russell" wrote:
> I have a small app that needs to access network shares mapped to local
> drive letters. The problem is that the pc it runs on (WinXP sp1)
> doesn't get used very often, so the shares get auto-disconnected by the
> server.
>
> The workaround thus far has been for the user to open Explorer and click
> on each mapped drive letter to force Windows to reconnect. This isn't
> very convenient, however.
>
> The share URI is contained in a database. I've considered using
> WNetAddConnection2/WNetCancelConnection2 to create temporary shares that
> exist as needed for my program; this would also get around times when
> the share is accidentally removed.
>
> Having said all that, my specific question is: How can I determine what
> persistent connections exist on a PC, and reconnect them as needed?
> BTW, this needs to work on all flavors of Windows >= 95. If it matters,
> I'm using VC++ 7.
>
> Thanks,
> Michael
>
- Next message: scallejo: "128 Return Code"
- Previous message: Bonj: "Re: debugging"
- In reply to: Michael Russell: "Reconnect autodisconnected drive mappings"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|