Symbolic links

  • Thread starter Thread starter Derek Hyland
  • Start date Start date
D

Derek Hyland

Hi

Does anybody know if it is possible to re-create unix
style symbolic links under the Windows 2K file system.
That is, have more than one directory entry pointing to
the one file.
I used to tweak the directory entry under DOS, and have
separate entries point to the same fat cluster, but it had
to be done manually, and of course, CHKDSK would "fix" the
problem :(
 
NTFS supports so called "hard links".

WIN32 API of Win2K contains
CreateHardLink function

You can create hard link under NT too.
In this case you should use native API (ntdll.dll)
NtOpenFile() and NtSetInformationFile( ....,11 );

typedef struct _FILE_LINK_RENAME_INFORMATION { // Info Classes 10 and 11
BOOLEAN ReplaceIfExists;
HANDLE RootDirectory;
ULONG FileNameLength;
WCHAR FileName[1];
} FILE_LINK_INFORMATION, *PFILE_LINK_INFORMATION,
FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;
 
Back
Top