BSTR as a parameter 
Author Message
 BSTR as a parameter

I am using VB 6.0 to develop Activex objects. Some of the parameters in the
interface defintion turn out to be BSTR. When VC++ users try to use my
objects,  they get an error "Acess Violation Error" in OLEAUT32.dll when the
BSTR value is returned back. Is this a known issue ? Or is there is specific
way BSTR parameters should be used in VC++ ?

Thanks



Sat, 20 Mar 2004 02:00:32 GMT  
 BSTR as a parameter

Quote:
> I am using VB 6.0 to develop Activex objects. Some of the parameters in the
> interface defintion turn out to be BSTR. When VC++ users try to use my
> objects,  they get an error "Acess Violation Error" in OLEAUT32.dll when the
> BSTR value is returned back. Is this a known issue ? Or is there is specific
> way BSTR parameters should be used in VC++ ?

Visual Basic doesn't do anything unusual with strings.  It sounds like the
problem is in their C++ code.  Try the microsoft.public.vc.* groups.

Also, MSDN Library has a nice article, called "Strings the OLE Way", on working
with BSTR in C++.  It's in Technical Articles -> Visual Tools -> Visual Basic ->
Extending VB with C++ DLLs -> Article 3: Strings the OLE Way

-- Matthew Solnit



Sat, 20 Mar 2004 02:01:34 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. BSTR's, BSTR->string, and maps

2. converting bstr to string

3. xmldoc.xml & string = bstr / Problem with encoding

4. Question regarding BSTR Visual c++ dll and VB 6- Please help

5. Passing String (BSTR) from VB5 to VC++ - stress test fails

6. Bizarre BSTR behavior

7. BSTR to COleVariant

8. xmldoc.xml & string = bstr / Problem with encoding

9. Passing SAFEARRAYS of BSTR and int to a VBScript

10. BSTR type

11. BSTR type

12. C++ ActiveX Property returns VARIANT Array of BSTR for VBScript or JavaScript

 

 
Powered by phpBB® Forum Software