I was looking at ChangeLog.cpp, and noticed that in
void ChangeLog::Segment::mapHeader()
it's expecting the wrong error return value (INVALID_HANDLE_VALUE).
According to
https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createfilemappinga,
the return value in case of errors is NULL, and never INVALID_HANDLE_VALUE.
The INVALID_HANDLE_VALUE is a possible value of the hFile argument (the
first parameter), specifically:
"""
If hFile is INVALID_HANDLE_VALUE, the calling process must also specify
a size for the file mapping object in the dwMaximumSizeHigh and
dwMaximumSizeLow parameters. In this scenario, CreateFileMapping creates
a file mapping object of a specified size that is backed by the system
paging file instead of by a file in the file system.
"""
I can change this together with the other changes I'm making, but I want
to double check: am I missing something here?
Mark
--
Mark Rotteveel