Bstr
`BSTR` stands for "Basic String"
Cstring
Refers to 0-terminated strings as popularized by C, as well as the header-files `string.h` and `cstring`.
Others
Example |
---|
A cstring is more like a visual basic string or a bstr from question Is a CString always null-terminated? |
About allocsysstring it creates a copy in bstr they re more complex than cstring they re null-terminated too but they also have length at negative offset from question CPP Windows string conversions confusion CStringA and LPCWSTR |
If the bstr doesn t have nul s embedded inside you can simply pass it to a cstring constructor that will make a deep-copy of it and you can locally work with your cstring;modifications to that cstring won t be visible on the original bstr from question Shall we treat BSTR type in COM as value or reference? |