Re: CFileDialog dialog doesn't release program folder untill the
app exits.
MrAsm wrote:
On Wed, 28 Mar 2007 16:48:49 +0800, "Eric" <EricLiu@moxrd.com> wrote:
Hi, everyone:
My tester found a bug of my responsible software. However, notepad also
behaves in the same way. Launch notepad, input something, save to a folder.
Turn to Windows Explorer to delete that folder. Windows shows an error
message box, saying " Cannot delete <folder name>; It is being used by
another person or program. ....". Close Notepad, try to delete it again.
Successful.
I am astonishing about this!!!!
Any idea?
I'm not astonished at all about this.
Instead, I think it is a correct behaviour by Windows to forbid to
delete files or folders that are in use (somehow "locked") by other
apps.
MrAsm
Eric/Asm:
Actually, there is something strange here. I tried it with Wordpad. It
is not the file that is "in use" by Wordpad that cannot be deleted, it
is the folder containing it. And it only seems to happen after Wordpad
has saved the file; it does not happen when Wordpad has just opened a file.
AFAIK, Wordpad is an SDI application. When it opens or saves, it opens
the file, reads or writes, and then closes the file again. It does not
hold on to the file handle. And in fact the file in question can be
deleted in Explorer; it is the folder containing it that cannot be deleted.
(This is all in XP Pro SP2)
David Wilkinson