Member Avatar

I need to know how can I get the process name (or path to the executable) that is currently using some file. Like I want to know which application uses Dll I want to replace, so I can kill the process...

You'll need to create a system snapshot and walk the processes and modules.
MSDN Tool Help Library

If you don't need to do it programmatically, you might want to check out Cedrick Collomb's Unlocker.

If you are trying to dink with system DLLs, there is a reason they are protected. If you are sure you know what you are doing though, check out Replacer. (It is a good tool despite the dilapidated webpage.)

Good luck!