Open a file, access denied 
Author Message
 Open a file, access denied

I have an application that runs just fine with debug build. I can open
and save documents in the debug mode and use the the serialization
mechanism for storing and loading.

I the release build I can create new documents and save them but I can
not load them. Something seems to go wrong in:


in specific in the method CDocument::OnOpenDocument at

CFile* pFile =
GetFile(lpszPathName,CFile::modeRead|CFile::shareDenyWrite, &fe);

if (pFile == NULL)
 ReportSaveLoadException(lpszPathName, &fe,
                        FALSE, AFX_IDP_FAILED_TO_OPEN_DOC);
                return FALSE;

an exception is raised right here. How is this possible this goes ok in
debug and wrong in the release build?

The exception tells me there is no access to the filen although there is

Sun, 30 Mar 2003 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. COM wrapper for DLL and rebuild errors - access denied file in use by another user

2. memory mapped files, access denied

3. access denied files

4. Can not access to the files in file open dialog

5. Web Service Access Denied problem

6. Compilation error CS0016 "Access denied"

7. Access Denied reading DirectoryEntry("IIS://server")

8. Can't create new project - access denied

9. access denied to my c drive

10. not able to kill Exe access denied error in Win2K

11. 0x80070005: Access is denied in release build but not in debug

12. DCOM access denied (newbie)


Powered by phpBB® Forum Software