Solved

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

Posted on 2004-08-23
3
829 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Have you ever set up your wireless router at home or in the office to find that you little pop-up bubble in the bottom right-hand corner of Windows read "IP Conflict - One of more computers on the network have been assigned the following IP address"…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 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

19 Experts available now in Live!

Get 1:1 Help Now