Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to map network drive in code?

Status
Not open for further replies.

cjtaylor

Programmer
Aug 12, 2001
69
US
Hello,

Does anyone know how to go about mapping a network drive within code? I am having problems losing the mapping of my network drive, so I wanted to map it with code.

Thanks
Chris Taylor
 
Are you sure you want to do this in CBuilder ?
I would use a batch file with this command
net use h: \\server\share <password> /user:<domain>\<username>

In C++ you could use the NetUseAdd API, I have never used it myself. I hope it is of any help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top