Pass parameters as BSTR or _bstr_t?
See the question and my original answer on StackOverflowIf you do nothing special with a BSTR but just pass it to another method, then you don't have to wrap it. You can see the BSTR as an opaque pointer.
_bstr_t (or CComBSTR which is another wrapper provider with Visual Studio) is useful when you need to allocate BSTR and don't want to manage memory yourself (and make sure you're not leaking memory), but they are not mandatory.
PS: unless I need to output a BSTR to a program that doesn't understand Unicode, I would never use an intermediary std:string
to pass BSTRs around, as I would take the risk of losing information. std:wstring
is better.