Creating and writing to Unicode file

9

99miles

Hello-
I can't figure out how to create and write to a Unicode file using
C++ in Visual Studio 6.0. I need to do this for windows only. Could
someonw please help!???

thanks-
 
I

Ian Lazarus

I don't know if this answers your question, but here goes.

The Windows functions which take a string argument come in two flavors,
i.e., with 'A' appended to its name, or with 'W' appended. These are for
Ascii (char) strings or for Wide (wchar_t) strings. For example, there is
CreateFileA() and CreateFileW(). You can see these in your Windows SDK
header files. The unadorned names, e.g., CreateFile() will be converted to
one of the two forms depending on whether UNICODE is defined or not during
compilation.

So if you want to use the unicode versions, make sure that UNICODE is
defined as a compiler constant. Otherwise you can excplicitly call the 'W'
functions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top