Board index » Visual Studio » Problem opening CD-Rom File with MFC
|
cyndymcc
|
Problem opening CD-Rom File with MFC
Visual Studio132
Hi, I'm using VC.Net 2003 and I'm getting an exception thrown when I try to open a file on a CD. It reproduces on an empty, wizard-generated, MDI, Doc-View project and happens on Win2k and XP. This happens with the following stack: ATL::CTime::CTime(const _FILETIME&, ... CFile::GetStatus() CFile::GetFilePath() CArchive::CArchive() CDocument::OnOpenDocument() etc. What happens is that GetStatus calls ::GetFileTime() which returns a zero value for the last access time which seems reasonable for a CD. The CTime constructor passes the zero value to ::FileTimeToLocalFileTime() which returns a garbage value (ffff ffbc f1dc c000) without complaint. This value is passed to ::FileTimeToSystemTime() which fails causing the constructor to throw the exception. This seems kind of basic for such well used code. Should I not expect to open CD files? Thanks - |
