A few questions on hard links

  1. Is there any method to enumerate all hard links to a file?
    I would like to implement some filename (or directory) based security. However, to ensure that the file is truly safe there must be no other link to it; I can prevent creation of any further links by filtering IRP_MJ_SET_INFORMATION / FileLinkInformation.

  2. What is FileHardLinkInformation class? I saw this value in the DDK. Google displays only one page containing ripped debug info from vista and one russian forum with a question without answer on this.

  1. I don’t know if you can ennumerate all hard links (directory entries) to a particular file. AFAIK, you can only get one arbitrary link for a particular file object with ZwQueryInformationFile / FileNameInformation (but for example, if you have 3 hardlink, you can’t decide what link / name to receive with FileNameInformation).

  2. I don’t know about FileHardLinkInformation

Sandor