How to tell if a program is reading or writing to a file

Hi, I'm trying to see if a program is writing to or reading a file with vc++. I know you can tell if a program is using a file with handle scanning, but I want to find out if it's reading or writing to the file. Any help would be appreciated.
the operating system knows. Can you ask it? (I don't know the answer, but I am offering a line of inquiry to dig into). If the OS can't or won't tell you, the hard disk driver may also be able to tell you, but it may also all be in addresses that you can't make sense of at that level (I Don't know that either!).
Last edited on
This smells like a https://xyproblem.info/
What is the real problem to be solved here?
I'm trying to make my own disk activity monitor like the Disk tab in Resource Monitor but a CLI version. please see: https://imgur.com/a/wE9ZNfw
Topic archived. No new replies allowed.