Cryptic Error popup
-
Hi All, Has anyone encountered:
An unnamed file was not found
error message box popup in your application before? It happens when I run the release version of my MFC program outside of MS Visual Studio. When run inside visual studio, both debug and release versions have no errors... Comments? Inputs? Thanks. -
Hi All, Has anyone encountered:
An unnamed file was not found
error message box popup in your application before? It happens when I run the release version of my MFC program outside of MS Visual Studio. When run inside visual studio, both debug and release versions have no errors... Comments? Inputs? Thanks.This is MFC framework error message. This will be occur when you try to open a file which doesnt exist physically. If this problem occurs in InitInstance()..then manually populate the CCommandLineInfo Object. For more info, let us know what u r doing! Hth, Ramu
-
This is MFC framework error message. This will be occur when you try to open a file which doesnt exist physically. If this problem occurs in InitInstance()..then manually populate the CCommandLineInfo Object. For more info, let us know what u r doing! Hth, Ramu
Thanks You for your help! Thanks to your note, I found the problem in one of my destructors. It was attempting to delete a file that does not exist.
CFileStatus fileStatus; // and get file status and test if the file exists CFile::GetStatus("temp.satdef", fileStatus); // m_attribute == 0xCC if does not exist // + 0x10 if it's a directory // - 0x04 if it's a system file // - 0x08 if it's a volume // =============================== // == 0xD0 if it does not exist or if it's a directory if (!(fileStatus.m_attribute & 0xD0)) CFile::Remove("temp.satdef");
Apparently, somehow, my fileStatus check sometimes doesn't work all the time.