A Quick Word About COM

[Previous] [Next]

When Microsoft was porting COM from 16-bit Windows to Win32, an executive decision was made that all COM interface methods requiring a string would only accept Unicode strings. This was a great decision because COM is typically used to allow different components to talk to each other and Unicode is the richest way to pass strings around.

If you are developing for Windows 2000 or Windows CE and are also using COM, you have it made. Using Unicode throughout your source code will make talking to the operating system and talking to COM objects a breeze.

If you're developing for Windows 98 and also using COM, you have problems. COM requires that you use Unicode strings. Most of the operating system functions require that you use ANSI strings. What a nightmare! I have worked on several projects in which I have written a lot of code solely to convert strings back and forth.



Programming Applications for Microsoft Windows
Programming Applications for Microsoft Windows (Microsoft Programming Series)
ISBN: 1572319968
EAN: 2147483647
Year: 1999
Pages: 193

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net