From: Earnie B. <ea...@us...> - 2012-01-13 12:33:39
|
On Thu, Jan 12, 2012 at 1:34 PM, <ct...@th...> wrote: > > > On Thursday, January 12, 2012 12:26pm, "Earnie Boyd" <ea...@us...> said: > >> On Thu, Jan 12, 2012 at 10:08 AM, Gisle Vanem <gv...@br...> wrote: >>> "Earnie Boyd" <ea...@us...> wrote: >>> >>>> Have you defined UNICODE before including the headers? It needs to be >>>> defined to get the wide string declarations and macros correct. >>> >>> What! 'IP_ADAPTER_ADDRESSES::FriendlyName' is a >>> PWCHAR (a 'wchar_t') no matter what (ASCII or UNICODE), >>> >> >> But other functions and macros you might use with the results aren't. >> > > This is another part of why there is always at state of ambiguity (even if just in the mind of the programmer) with the macro influenced character types, and why it is best to just "keep it manual". The entire concept of something as fundamental as a character/string type being a wild card is a disaster. More so obviously when both are used in the same program (which is likely most code with any affinity towards *nix). But it's always best to DTRT regardless of if you use A or W directly because you might not know every little detail. -- Earnie -- https://sites.google.com/site/earnieboyd |