Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

WNetAddConnection failed.

$
0
0

Hi,

I have used "WNetAddConnection function" API to map n/w drive(to a local shared path) and its working fine.

But when I executed my application on system start up, sometimes this API fails with error code 53(ERROR_BAD_NETPATH).

When I put some delay in  my application( before calling WNetAddConnection ), it works.

Hmm.. i think the problem occurs because of WNetAddConnection  API is called before some OS initialization( may be some shares or sometime..).

Does anyone have the same problem? Any workaround is possible?

Any guidance would be appreciated.

Thanks,

Arun


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>