Glenn
8/18/2007 12:19:00 PM
Hi
I have a C# DLL which has a method which accepts a string argument. This is
registered for COM. The resulting .tlb is then referenced in a native C++
DLL. I then wrap the method in a C++ method and add some trace code. The
wrapped C# method also includes some trace code. When I attempt to run the
C++ method, passing a BSTR to it, the C++ methods trace code fires, however,
the C# method call doesn't appear to do anything.
The strange thing is that if I remove the string argument from the C#
method, regenerate the .tlb and change the wrapper method accordingly the C#
trace code fires. I have other methods which accept and return numeric
types which issue, it's just this one which accepts a BSTR that seems to be
a problem.
I should say that the C++ dll has to be native to integrate with an ancient
PowerBuilder component which can't be changed, hence the C++ to COM to C#
process.
I'm rather lost on this one, as I know almost nothing about C++, so I'd
really appreciate if anyone can give me a few pointers (no pun intended).
Many Thanks
Glenn