VS.NET _bstr_t flawed?
-
Is it me or is the latest implementation of the _bstr_t class flawed in Visual Studio .NET? I have a class that has an internal member of type _bstr_t. During construction the _bstr_t classes default constructor runs and sets it's internal m_Data pointer to NULL. Later i call a function with a BSTR parameter and use the _bstr_t::Assign method to copy the BSTR into my member variable. Under VS6 this code was fine but under VS.NET it crashes. The reason for the crash is in an ASSERT where the expression is something like (m_Data->GetWString() != s) since m_Data is NULL it crashes! Since it's in an assertion i can compile to a release build and it works ok. Has anyone else seen this and is there any kind of service pack for VS.NET that fixes the problem?