Solved

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

Posted on 2004-08-23
3
852 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:
bbao 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enterprise networks where VoIP phones have been deployed frequently use port configurations that allow both a computer and an IP phone to be plugged into the same switch port but use different VLANs. On Cisco equipment I'm referring to the "native V…
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 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