How to get PIDs of processes that are using a given file name and mutex name?
(Not by custom kernel driver, but in C# in user mode.)
UPDATE: Thanks to Daniel Renshaw I found a script that lists all handles with PIDs. (Using a not undocumented and unfrozen functions.)
The following two SO questions may be of use:
How do I find out which process is locking a file using .NET?
Summary: use handle.exe and parse the output (i.e. not a great solution)
Win32: How to get the process/thread that owns a mutex?
Summary: may not be possible in user mode without using deprecated or undocumented functions (but some smaple code is provided in this question).