|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-09-17 11:49:07
At 10:02 AM 9/17/2002, Martin Schuerch wrote:
>The same problems as recently reported for exception.cpp happens in
>operations_posix_windows.cpp, when the project is set to unicode.
>
>It compiles in unicode and multibyte, when the follwing types and
functions
>are used in the char-version:
>
># define BOOST_SYSTEM_DIRECTORY_TYPE WIN32_FIND_DATA: WIN32_FIND_DATA ->
>WIN32_FIND_DATAA
>
>FindFirstFile -> FindFirstFileA
>
>GetFileAttributes -> GetFileAttributesA
>
>GetFileAttributesEx ->GetFileAttributesExA
>
>CreateDirectory-> CreateDirectoryA
>
>RemoveDirectory->RemoveDirectoryA
>
>DeleteFile->DeleteFileA
>
>MoveFile->MoveFileA
>
>CopyFile->CopyFileA
>
>GetCurrentDirectory->GetCurrentDirectoryA
Thanks, I'll fix it. For those of you wondering what we are talking about,
the Win32 API documents a bunch of functions operating on narrow strings,
but they are really implemented as macros. So depending on macro
definitions, they may unexpectedly start trafficking in wide char strings
rather than narrow char. A trap for the unwary. The fix is to avoid the
macro names, and use the names of the functions being forwarded to.
--Beman
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk