wxFileOutputStream in wxMSW 2.7.1

John Skiff john at dgi.com
Wed Nov 1 17:05:47 PST 2006


I'm unable to delete the file associated with a wxFileOutputStream in an 
application built with wxMSW 2.7.1. I get "access denied". I'm trying to 
do it in my RedirectedProcess::OnTerminate method. I've tried calling 
wxProcess::CloseOutput() first but that had no effect.

I think that something is broken in wx2.7.1 because the console sample 
app fails with

File stream size: 3
foo ERROR: failed to remove the file 'testdata.fs'.
 
on the code

    if ( !wxRemoveFile(filename) )
    {
        wxPrintf(_T("ERROR: failed to remove the file '%s'.\n"), 
filename.c_str());
    }

which is similar to my own code.

Can anyone help?

Thanks,
john






More information about the wx-users mailing list