开发者

Mount Network Drive Locally in MFC(VC++)?

How to Mount Network Drive Locally in MFC(VC++) ? C开发者_开发问答urrently I am using WNetAddConnection2 to mount drive but it mount drive on network, I want to mount it has locally.

Any help is appreciated. Thanks.


Do you mean that you want to use a drive letter to attach a network share? I would call the system command net, like so:

net use X: \server\share /PERSISTENT:NO

where X is the drive letter you want to use. The PERSISTENT flag prevents it from remounting on boot. When you're finished, call net again with:

net use X: /DELETE

and it will umount the share.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜