开发者

How to use CreateHardLink(string lpSymlinkFileName, string lpTargetFileName, IntPtr lpSecurityAttributes) with a relative path for target?

开发者 https://www.devze.com 2023-01-22 19:49 出处:网络
Using [DllImport(\"kernel32.dll\")] static extern bool CreateHardLink(string lpSymlinkFileNa开发者_运维技巧me,

Using

[DllImport("kernel32.dll")]
static extern bool CreateHardLink(string lpSymlinkFileNa开发者_运维技巧me, 
string lpTargetFileName, IntPtr lpSecurityAttributes);

should I be able to use a relative path for the lpTargetFileName?

It doesn't seem to work for me. Should it? It works with full paths.

Edit:

This is Windows 7 and/or 2008

0

精彩评论

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