How to find out what files a process is using

Hello Forum,

I'm currently writing a program that records the runtime of a process but only if a specific file (the user choses) is used by the selected process.

My problem is:
I can't think of a way to get the names (or IDs) of any process that is using the file or how to find out which files are used by my selected process.

Thanks for any help,

Takiro
Topic archived. No new replies allowed.