unlock file

This is a discussion on unlock file within the Tech Board forums, part of the Community Boards category; Hi all, I have one problem. Who know how to unlock the file, which has been locked another process? I ...

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    1

    Exclamation unlock file

    Hi all,

    I have one problem. Who know how to unlock the file, which has been locked another process?
    I have a program, which opens the file certain type. If I want download file from Internet then I click on link. After that appear window with two buttons ('open' and 'save'). If I click on 'open' then my program cannot open file, because it locked by Internet Explorer. That problem happens only with IE7. With other browsers, all works fine. If I click on 'save' button then open file, file opens without any problems.
    May be somebody meet the same problem? Could you please help me?

    Thanks.

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,262
    It is simply a bug. While you can close a handle maintained by a particular process (assuming you have debug privileges), in the case of Microsoft software doing so is likely to cause it to keep creating message boxes saying "Please insert disk into drive blah" until you kill it.

    The easiest way to unlock the file is to use a process management program (like Process Explorer) to find out which process has a handle open on that file and kill the process.

    But if the only time you're getting this is with IE7, try not using it.

  3. #3
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,590
    I wrote some code awhile back that will kill any process - well almost any process to be fair. It would not be my first choice to distribute the code for even though it's rather simple in operation it's also rather dangerous if used incorrectly or for less than heroic purposes.

    Do some research here on this forum under Windows programming and on CodeGuru and you will find all you need.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  2. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM
  3. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  4. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21