djpolgio Posted September 23, 2017 Posted September 23, 2017 I know this is not an easy one .... I tried with IFileIsInUse but works only if the Process uses it to lock the files. I tried also what suggested as "The Hard Way" here : hxxps://stackoverflow.com/questions/8726906/delphi-finding-the-process-that-is-accessing-a-file-from-my-program but seems not working either any idea ? Regards S
opc0d3 Posted September 24, 2017 Posted September 24, 2017 9 hours ago, djpolgio said: I know this is not an easy one .... I tried with IFileIsInUse but works only if the Process uses it to lock the files. I tried also what suggested as "The Hard Way" here : hxxps://stackoverflow.com/questions/8726906/delphi-finding-the-process-that-is-accessing-a-file-from-my-program but seems not working either any idea ? Regards S "seems not working" ? Did got any errors ? QueryProcess -> QueryOpenHandles this could be useful -> http://forums.codeguru.com/showthread.php?176997.html 1 1
Conquest Posted September 24, 2017 Posted September 24, 2017 Try sysinternals Handle application https://docs.microsoft.com/en-us/sysinternals/downloads/handle A warning - Check for possible driver based kernel hooks if any 1 1
djpolgio Posted September 24, 2017 Author Posted September 24, 2017 Thanks, @Conquest I'll check it out, @opc0d3 no errors, just the locked file is not found. To do tests I used "Easy File Locker", I think the way it locks the file could be the problem. Infact I tested by writing a file in a loop (my app) and the lock was detected smoothly. S
atom0s Posted September 25, 2017 Posted September 25, 2017 Here's an example on CodeProject: https://www.codeproject.com/Tips/893593/Cplusplus-MFC-File-Unlocker 1 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now