Jump to content
Tuts 4 You

Find the process name that locks a file


djpolgio

Recommended Posts

Posted
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

  • Like 1
  • Thanks 1
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...