<p>How do I get the list of open file handles by process id in C#? </p>

<p>I'm interested in digging down and getting the file names as well. </p>

<p>Looking for the programmatic equivalent of what process explorer does. </p>

<p>Most likely this will require interop. </p>

<p>Considering adding a bounty on this, the implementation is nasty complicated.</p>

You can P/INVOKE into the
```
NtQuerySystemInformation
```
function to query for all handles and then go from there. This
Google groups discussion
has details.