News for hackers. Stuff that matters.
Re:Fibers: An Elegant Windows API by scarface74 on Friday March 29, 2019 @11:31AM (#19522520)
Consistency?

Let’s start with strings...

- the standard null terminated single byte char C string

- the double wide null terminated C string required for dome frameworks - especially Windows CE

- the COM BSTR where the first two bytes are the length

- the ATL bstr_t

- CString that isn’t a null terminated C string

- of course the C++ string class. I’m not sure if this is ever used by the Win32 APIs

I’m sure I’m missing one.

Re:Fibers: An Elegant Windows API by cpeterso on Friday March 29, 2019 @12:30PM (#19523114)
TCHAR probably counts because, even though it's just a typedef for char or wchar_t, it has its own t-prefixed APIs and mental overhead of having to write code that can work with either character size.
Re:Fibers: An Elegant Windows API by Impossible on Friday March 29, 2019 @12:31PM (#19523124)
If you count various flavors of UWP (C++/CX, C++/WinRT, WRL) you can add std::wstring and Platform::String^
Re:Fibers: An Elegant Windows API by asveikau on Friday March 29, 2019 @06:43PM (#19526272)
Don't forget HSTRING, which Platform::String^ is built on. They added those two in Windows 8 because there was no one standard string type. (Not joking.)
Re:Fibers: An Elegant Windows API by xpaulbettsx on Friday March 29, 2019 @08:16PM (#19526703)
Re:Fibers: An Elegant Windows API by scarface74 on Friday March 29, 2019 @08:38PM (#19526797)
So there is also the OEM_STRING and the ANSI_STRING