IonicWind Software

Aurora Compiler => General Discussion => Topic started by: Zen on December 17, 2005, 02:29:42 PM

Title: Windows API
Post by: Zen on December 17, 2005, 02:29:42 PM
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
Title: Re: Windows API
Post by: Parker on December 17, 2005, 03:20:10 PM
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.
Title: Re: Windows API
Post by: Zen on December 17, 2005, 03:30:51 PM
Oh i thought as much. That settles that then. Thanks

Lewis
Title: Re: Windows API
Post by: Ionic Wind Support Team on December 17, 2005, 03:35:46 PM

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.