April 25, 2024, 07:18:53 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Windows API

Started by Zen, December 17, 2005, 02:29:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zen

Ive come to wonder why it is that we have to put and "A" at then end of a lot of Windows API functions in order to get them to work. This is in both IBasic and Aurroa. Yet in the platform SDK it does not. Some i have noticed have a "W" in the SDK but i think they are functions that deal with unicode.

Can someone explain what this means.

Lewis

Parker

By putting the A on the end, it's referring to an ASCII string. By putting a W, you're referring to a unicode or wide string. Any functions that have string parameters or deal with strings have the suffix. And if you look in the headers, you'll see something like this:
#ifdef UNICODE
#define MessageBox MessageBoxW
#else
#define MessageBox MessageBoxA
#endif

of course, there's a lot more in between those #ifdef and #endif blocks, but it just demonstrates what goes on.

Zen

Oh i thought as much. That settles that then. Thanks

Lewis

Ionic Wind Support Team


Also on MSDN you'll see a box at the end of every function that will tell if it is implimented as both Ansi and Unicode.   Which menas there are two versions of the function in the system DLL, one with the A and one with the W.
Ionic Wind Support Team