Posted September 23, 20177 yr 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
September 24, 20177 yr 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
September 24, 20177 yr Try sysinternals Handle application https://docs.microsoft.com/en-us/sysinternals/downloads/handle A warning - Check for possible driver based kernel hooks if any
September 24, 20177 yr Author 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
September 25, 20177 yr Here's an example on CodeProject: https://www.codeproject.com/Tips/893593/Cplusplus-MFC-File-Unlocker
Create an account or sign in to comment