title: Identify if a file(dll/exe) is locked or not by a process or library
body: <p>I'am planning to write a sample program which identifies a file (a dll file) locked by / used by some process.</p>
  
  <p>How can we achieve this programmatically using WIN API (a C/C++ function)? Actually, when we are performing some software upgrade process some other process might be using the library which will interim fail the upgrade operation.</p>
  
  <p>The best example I would like to bring here is the Unlocker tool which lists all the process/dll which are using a particular file.</p>