I want my program to detect when a file is closed in order to encrypt it again.
Is there a better way to do this than checking periodically the process list if the program opened the file is still open?
I want my program to detect when a file is closed in order to encrypt it again.
Is there a better way to do this than checking periodically the process list if the program opened the file is still open?
Using Windows 10 with Code Blocks and MingW.
Does your decrypt/encrypt program run say the editor as a sub-process?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
No, not sub-process, just opens a file simply.
But you gave me an idea, maybe if I open it up from a thread I could check for the thread if its still running.
Using Windows 10 with Code Blocks and MingW.