
Beman Dawes wrote:
"Jan Hermelink" <Jan.Hermelink@metalogic.de> wrote in message
Another idea: - Get a WIN32 file handle with CreateFileW() - Get filename from handle:
http://msdn.microsoft.com/library/en-us/fileio/fs/obtaining_a_file_name_
from_a_file_handle.asp - use thereby the "Ansi" function to get the "ansi" filename (GetMappedFileNameA())
However I have not tested this...
I don't see how that could work unless the codepage is correct, but like you I haven't actually tested.
You are right - I have tried this with a file name with greek characters, and GetMappedFileNameA() failes to translate them correctly: all greek characters are replaced with '?' (with german system locale). Yet another idea: - open file with _wfopen() and get FILE pointer - construct basic_*fstream with this FILE pointer (Dinkumwares (and other) implementation has basic_fstream(FILE*) etc. as an extension) Jan