Post by Stanislaw FindeisenI did think that hard links (which do work on files) might be implemented
by reparse points but checking the dissasembly of
kernel32!CreateHardLinkW, there is no DeviceIoControl call, just an
NtSetInformationFile with information class FileInformationLinkName.
Whilst it is possible that ntoskrnl!NtSetInformation sends an IRP of
FSCTL_SET_REPARSE_POINT with IO_REPARSE_TAG_MOUNT_POINT to the file
object, I don't know.
(1) Hard links are no files.
"Flags, attributes, access, and sharing that are specified in CreateFile
operate on a per-file basis."
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/createhardlink.asp)
No, I didn't say they were, what I was getting at was that they are a file
system object. I suspect (allthough I haven't checked) that they are just
MFT entries for which the $DATA attribute points to the same clusters as
another MFT entry.
Post by Stanislaw Findeisen(2) FILE_ATTRIBUTE_REPARSE_POINT stands among other simple file attributes
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getfileattributes.asp)
I'm not sure what you are getting at here. The FILE_ATTRIBUTE_REPARSE_POINT
attribute cannot be directly set on a file in exactly the same way as
FILE_ATTRIBUTE_SPARSE cannot be directly set using SetFileAttributes. It can
be retrieved by GetFileAttributes granted, but in order to create a sparse
file, you have to send FSCTL_SET_SPARSE to the file object. If you have a
sparse file then the only way to clear the FILE_ATTRIBUTE_SPARSE is to
overwrite the file. The same is true of reparse points, you can set, get and
delete reparse points via DeviceIoControl calls, but that is it.
Post by Stanislaw FindeisenIt struck me that you haven't said what you wanted to do with your
reparse points. What is your goal?
Just to create a reparse point to help testing a backup application.
Have you tried using IO_REPARSE_MOUNT_POINT for directories and
IO_REPARSE_HSM on a file? Whilst not a comprehensive test, this would show
how your backup application handles reparse points.
Post by Stanislaw Findeisen+-------------------------------------------------------+
| When replying, please replace "my_initials" in the |
| From: address field with my initials - that is, "SF". |
+-------------------------------------------------------+
--
http://www.nglogic.com
Enter through the narrow gate! (Mt 7:13-14)