
10 Sep
2004
10 Sep
'04
2:49 a.m.
Jonathan, memmap.cpp makes assumptions about character width that will not be true in the specific case where UNICODE is defined. For example, the declaration assumes that strings will be narrow but CreateFile is called. CreateFile is a macro that translates into either CreateFileA or CreateFileW depending on the _UNICODE/UNICODE macro. If _UNICODE is define the code will not compile. You should explicity call Ansi versions of Windows api's where narrow character streams are intended. A better solution for cases such as memmap.cpp would be to parameterize the character type and provide both Ansi and Unicode implementations. Try calling readonly_mapped_file::open with a simplified chinese path, for example. Regards, George.