-
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.
-
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. ;)
-
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.