Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Problem with passing a _bstr_t to .Net COM compone

I am seeing what seems to be a very strange behavior
when passing a _bstr_t parameter to a .Net COM object
property. Every now and then, the value received by the
component turns out to be empty. It is not impossible that
the problem is actually in the client code and that the
bstr gets somehow messed up prior to being passed to
the object, but it's rather unlikely, so before I focus on that, I thought I'd see if anyone has seen anything like this.

The component is a C# COM interop DLL, the property is of type string (defined in an interface and in a class that implements the interface), and the client is VC++ 6.0.

Any ideas would be highly appreciated.

Mike
Monday, December 23, 2002

*  Recent Topics

*  Fog Creek Home