A BSTR (BSTR is a macro definition in the Active Template Library), B-String, or Basic String is an OLE Automation standard type for a Unicode string. In standard builds, it is a null-terminated array of 8-bit characters prefixed by its length, however, in Unicode builds, it is an array of 16-bit characters. Even though it is null-terminated, the length of the string is not determined by the first occurrence of null, but by the length prefix. In Automation-native environments like Visual Basic, this type is automatically built-in to the runtime. However, in languages like C++, the BSTR is an alien that has to be dealt with. ATL provides C++ programmers with the CComBSTR or _bstr_t classes that make life with BSTR much easier.