Need help detecting a process
I wish my application to be able to Lock and Unlock a file programatically. The so-called 'lock' and 'unlock' is actually a disk file encryption and decryption respectively, where the encrypted file name is *.lck and the decrypted file name is .*dat (both binary files).
For security, I wish to have my application delete the decrypted (aka, unlocked) file from the disk after it has been used.
My problem is that sometimes the 'lock' works and at other times it does not. When it does not work, the GetLastError message is:
Quote:
DeleteFile(inFile) failed with error32: The process cannot access the file because it is being used by another process.
I would like to know specifically which 'another process' is preventing the locked file from being accessed. Is there some clever way to detect this malevolent process, say using Spy++ or some such?
Re: Need help detecting a process
Re: Need help detecting a process