View Single Post
Old 3rd February 2003, 18:59   #12
Junior Member
Join Date: Jan 2003
Location: Fremont, CA
Posts: 9
Send a message via ICQ to AnalogKid
Unfortunately, it still doesn't work after CONVERTing both drives to NTFS. No big loss for me in converting them but I'm kind of bummed that it still won't work.

I did some digging in the NTKernel docs in MSDN and found this statement (under remarks):

"Windows_NT/2000/XP:__If the file mapping object is backed by the paging file (hFile is INVALID_HANDLE_VALUE), the paging file must be large enough to hold the entire mapping. If it is not, MapViewOfFile fails."

The way the code is structured, it looks like m_hFile can continue to be invalid after your CreateFile() call which will skip the m_mapping=MapViewOfFile and fall right into the if (!m_mapping). I'm not sure that's what you really meant to do. Basically, if you have any of the following it looks like you'll get the same error msg:
1) m_hFile == INVALID_HANDLE_VALUE (if the CreateFile() failed)
2) m_hFileMap == NULL (if m_hFile == INVALID_HANDLE_VALUE)
3) m_mapping == NULL (if MapViewOfFile() is never called)

If I get time later in the week I'll step through the mess on my end and let you know at which step everything goes to shit over here.


AnalogKid is offline   Reply With Quote