Trying to open a file i might get a error code 32 (sharing violation).
How can i figure out which process (e.g. process ID, or thread id) that is locking the file?
Bonus Reading
- Superuser: Find out which process is locking a file or folder in Windows
- Technet: How to find out which process is locking a file or folder in Windows
- Technet: How to find out which process is locking a file or folder in Windows by PowerShell
- Technet: How to find out which process is locking a file or folder in Windows by VBScript
- Windows: files locked by process
- Winapi: Get the process which has specific handle of a file
- How to check if a file is being used by another application? (which asks a different question: How to check if a file is in use by another application. I already know it is in use by another application (hence the sharing violation). I need to know who is using it.)