WCHAR trouble

Started by
0 comments, last by phil_t 17 years, 5 months ago
I have got sapi to working and in the function to speak is Speak (L"OK", SPF_DEFAULT, NULL ); the first parameter that has the string literal and the "ok" in it is using the WCHAR data type format, the problem is that when i try to add my own varible in there it gives me lots of errors. Can somebody explain to me how to use the WCHAR data type.
Advertisement
The first parameter must be a pointer to WCHAR, not just a WCHAR itself. Although unless you tell us what code is giving you what errors, we can't really help.

WCHAR is just like char, except it's a wide char (2 bytes).

const WCHAR *pszFoo = L"OK";Speak(pszFoo, SPF_DEFAULT, NULL);

This topic is closed to new replies.

Advertisement