Solved

maping a network drive to webdav server in  c/c++ in windows

Posted on 2004-08-23
3
817 Views
Last Modified: 2013-12-19
i have to map a network drive to webdav server.  so that we can access the contents in the webdave server as in the drive.  i mean  netwok drive(x: ,y: , z: ) .  

i have used  wnetaddconnection() method . But it doesn't work.
and also i have used NetUseAdd() method.
Plz tell me if another solution for this problem. if it should done with these methods, how can we do that.
0
Comment
Question by:RamaKoti
3 Comments
 
LVL 37

Accepted Solution

by:
Bing CISM / CISSP earned 125 total points
ID: 11874724
personally, i think WNetAddConnection() is the right method to implement the function. here are some cues:

1) on the runtime machine, can you successfully map a network drive by manual operation? if it is not, please make sure all the related components and services should be running well for this operation, such as "client of MS network", "file and printer sharing for MS network", "workstation" and "server" services, NETBIOS over TCPIP etc.

2) have you noticed that WNetAddConnection() function is provided only for compatibility with 16-bit versions of Windows. Other Windows-based applications should call the WNetAddConnection2 or the WNetAddConnection3 function?

3) after calling the WNetAddConnection(), what is the Return Values? have you check the return value for error codes? MSDN gives the complete table of the error codes.

moreover, please also make sure that the following header file, library and character-set are correct.

  Header: Declared in Winnetwk.h.
  Library: Use Mpr.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000/XP. Also supported by Microsoft Layer for Unicode.

hope it helps,
bbao
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now