Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Feb : Accessing Mapped, But Disconnected, Network Drive

www.cryer.info
Managed Newsgroup Archive

Accessing Mapped, But Disconnected, Network Drive

Subject:Accessing Mapped, But Disconnected, Network Drive
Posted by:"Andrew Hallam" (metaspati..@gmail.com)
Date:Tue, 07 Feb 2006 23:04:49 +1100

My application is trying to access files on a network drive mapped as H:
that is always reconnected at logon.

However, when my PC first boots up that drive is is shown with a Type of
  "Disconnected Network Drive" rather. Any attempt to access files on
that drive fails. e.g. SetCurrentDir('H:\') returns false.

If I then open My Computer and double click on that network drive its
Type changes to "Network Drive", and then my application can access the
files it needs.

Is there any way to force Windows to reconnect to a disconnected mapped
drive?

I tried WNetAddConnection2 but it is saying that H drive is already in
use. Thanks.

Andrew

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive