1
2
3
4
5
6
|
[DllImport("kernel32.dll", EntryPoint="CreateHardLinkA", CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
private static extern long CreateHardLink(string lpFileName, string lpExistingFileName, IntPtr lpSecurityAttributes);
public void CreateHardLink(String sourcePath, string destPath) {
CreateHardLink(destPath, sourcePath, IntPtr.Zero);
}
|