CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Threaded View

  1. #2
    Join Date
    Aug 2001
    Location
    Stockholm, Sweden
    Posts
    1,664

    Re: How to detect name of application that has locked File/Folder?

    You can use the free utility Handle to list/enum all handles (like opened file objects).

    For many years ago, I posted a question about something like this:
    Enum HANDLEs for current process
    AdaraCD gave a good answer. I never got to implement it because I found out that I didn't actually need to enum handles for the project I was doing (so I never tried to code).

    Another solution is to execute Handle.exe and parse the output (start the process and redirect the stdout with pipes). This is acutally a quite good solution I think, because Handle.exe is probably very good written and you don't have to deal with low-level stuff and O/S compatibility problems.
    Last edited by j0nas; December 23rd, 2007 at 04:35 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured