From: Carl Daniel (cpdaniel_at_[hidden])
Date: 2002-02-23 14:57:34
From: "Beman Dawes" <bdawes_at_[hidden]>
> At 11:46 AM 2/23/2002, Chris Little wrote:
> At 11:51 AM 2/23/2002, Alan Bellingham wrote:
> At 11:52 AM 2/23/2002, Carl Daniel wrote:
> Explaining that GetFileAttributes is actually a macro,
> mapping to GetFileAttributesA or GetFileAttributesW
> Amazing! Both the hard copy and (my 1999 copy of) MSDN library reference
> describe GetFileAttributes as a function rather than a macro. I guess MS
> expects you to read the header.
> Thanks a lot!
> Follow-on question: Using the C++ standard library on Win32, how do you
> open a file that requires std::wstring to represent the filename? Or is
> there no way to do that without resorting to the Win32 API?
AFIAK, there's no neat way to do it. Converting the wstring back to ANSI/multi-byte is A) a pain and B) wrong in the
long run, since the Unicode name might have characters not representable in an MBCS. IMO the standard library stream
classes should offer wchar_t constructors independent of whether the stream's CharT is char or wchar_t.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk