Comprehensive guide to BSTRs
The comprehensive guide to BSTRs from Microsoft: http://msdn.microsoft.com/library/te...n_article3.htm
It should answer all your questions - and it certainly helped me avoid lots
of mistakes in COM!!
"Brian Leung" <firstname.lastname@example.org> wrote:
>I'd like to pass BSTRs back and forth between C++ and VB.
>Reading the documentation on _bstr_t, it sounded like I could
>attach the _bstr_t to an existing BSTR (created in VB) and modify
>the BSTR. There is an option such that _bstr_t does not create
>a new BSTR. That works, but why doesn't it change the BSTR that VB
>sees? When I pass the string back, I get the original string.
>Also, If I create a BSTR within C++ and call a function within
>VB, passing the BSTR to the function, and if I modify the BSTR
>will this cause problems? Are there any solutions?
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL