I am looking for a way to create a program in unmanaged c++ that waits until a file is unlocked (as in it is no longer in use) and than does something. I have had no luck locating how to do this, any help would be appreciated!
UPDATE: I may have answered my own question, see below and tell me what you think..
UPDATE: All that really matters is that the file is writable, it doesn’t matter if it is still in use.
Here is one possible solution to my problem, does anyone see a problem with this?
Thanks again!
UPDATE: Changed the code to be more complete.