How do I find out which process is locking a file using .NET?

Posted by AJ on Stack Overflow See other posts from Stack Overflow or by AJ
Published on 2008-11-25T11:34:47Z Indexed on 2010/03/28 23:03 UTC
Read the original article Hit count: 176

Filed under:
|

I've seen several of answers about using Handle or Process Monitor, but I would like to be able to find out in my own code (C#) which process is locking a file.

I have a nasty feeling that I'm going to have to spelunk around in the win32 API, but if anyone has already done this and can put me on the right track, I'd really appreciate the help.

Update

Links to similar questions

© Stack Overflow or respective owner

Related posts about c#

Related posts about file-locking