Directory Info using GetFileInformationByHandleEx

Discussion in 'MFC' started by itsmeash, Sep 2, 2010.

  1. itsmeash

    itsmeash New Member

    Sep 2, 2010
    Likes Received:
    Trophy Points:
    Hello all,

    I hooked NtSetInformationFile to intercept delete call, This is done, Now i have a file which contains name of files and folder need to be protected, Protecting file is no problem as i get the file name from file handle and using strcmp i decide whether to delete the file or not, But how to determine that the file handle i get in NtSetInformationFile is folder?

    I tried using GetFileInformationByHandleEx with FileStandardInfo which should give me whether the handle is directory or not, But it always returns TRUE(folder) when there are no files inside and FALSE(not folder) when there are files inside.

    Thanks all.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice