3 ms·
Consistency? Let’s start with strings... - the standard null terminated single byte char C string - the double wide null terminated C string required for dom
by scarface74 8y ago
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.
- cpeterso 8y agoTCHAR 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.
- Impossible 8y agoIf you count various flavors of UWP (C++/CX, C++/WinRT, WRL) you can add std::wstring and Platform::String^
- asveikau 8y agoDon'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.)
- xpaulbettsx 8y agoUNICODE_STRING too - https://msdn.microsoft.com/en-us/windows/desktop/ff564879 https://msdn.microsoft.com/en-us/windows/desktop/ff564879
- scarface74 8y agoSo there is also the OEM_STRING and the ANSI_STRING