H
HONOREDANCESTOR
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
object.
Is there any other possible workaround that I could use?
Thanks,
HA
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
object.
Is there any other possible workaround that I could use?
Thanks,
HA