Trying To Call GetFileInformationByHandle From C#

  • Thread starter Thread starter Gordon Delgado
  • Start date Start date
G

Gordon Delgado

Guest
Hi,

I am working on a file archiving project, and need to know how many (hard) links to a file. It looks like the only way to get this is by dropping to a C++ function GetFileInformationByHandle.

Problem is, this looks pretty tricky. I have Googled extensively to no avail. Searching for MSDN magazine articles looks promising, but the links all seem 404. I looked at PInvoke.net, but the page for this function looks mangled (or plain wrong) with lots of "ToDo" entries.

Does anyone have any boilerplate or working examples of how to make this work in managed code? I'm a bit of a newbie at C#, so this whole interop thing is a mystery. Thanks in advance.

Continue reading...
 
Back
Top