开发者

Unable to create a Directory in th mapped drive

开发者 https://www.devze.com 2023-01-21 05:34 出处:网络
I am unable to create a directory in a mapped drive. e.g. i hav开发者_运维知识库e mapped U: to some location which there in the network. Using vc++ i am using CreateDirectory api, but it\'s not able t

I am unable to create a directory in a mapped drive. e.g. i hav开发者_运维知识库e mapped U: to some location which there in the network. Using vc++ i am using CreateDirectory api, but it's not able to create directories. If i am giving any local machine location, it's creating. any solutions. Please let me know.

I have tried debugging my application, i find out that while running window service it's not creating but through debugging it's creating.

NOTE: the location i want to create directory have full permissions.


It looks like the drive mapping to U: is not visible from your service. That's expected, since drive mappings are usually established per-user or per-session.

However, CreateDirectory() supports UNC paths, so you can pass \\server\share\path directly instead of using a mapped drive.

0

精彩评论

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