0

Windows tool Handle.exe created by Mark Russinovich (link) can be used to get the list of files opened by a process.

In my app I need the same feature - I need to know list of files opened by a different process.

How to implement this in my app? Is it better to implement this in my app or launch Handle.exe as subprocess and parse output? I briefly searched WinAPI docs and didn't found how to implement this...

For me it's not a problem to have an additional .exe file in the app folder. Main goal - everything should work fine on all Windows version since WinXP.

P.S. Seems that this is very easy task in python link ))

Community
  • 1
  • 1
Victor Mezrin
  • 2,797
  • 2
  • 32
  • 48
  • I think in c++ it's much the same as in the [2nd answer](http://stackoverflow.com/a/12726488/1413395) to that python question you have linked. Use these functions from the windows API. – πάντα ῥεῖ Jan 11 '16 at 18:32
  • This how to get the name of `.exe` file that has been launched. I need list of files opened by a process after it has been launched. – Victor Mezrin Jan 11 '16 at 18:37
  • 1
    You can peek into python's [psutil implementation](https://github.com/giampaolo/psutil/blob/master/psutil/arch/windows/process_handles.c#L32) (bsd-style license) – dewaffled Jan 11 '16 at 18:56

0 Answers0