Converting dotnet dll to com object - one problem arises - any workarounds?



I've been converting a dotnet dll to a com object so that it can be
called from vb6. If I want to pass a structure to a routine in the
com object, like this:
Call MyRoutine(byref MyStruct as MyStructType)
it works when the structure is a simple structure full of integers,
dates, etc.
But if the structure contains one or more strings, I get an error
message when compiling the caller. Apparently you cannot pass a
structure that has strings.
One solution would be to take all the strings from the structure (mine
has 14 of them) and use them as separate arguments to the routine.
This is inconvenient for the user. Another solution is to have an
intermediate vb6 dll that has a routine that receives the structure,
and dissects it into the 14 strings, and then passes those to the com
Is there any other possible workaround that I could use?


Your error is from the VB 6 compiler, not VS 2005. Have you posted this to a
group regarding VB 6?

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question