ErezMor
asked on
create a c++ function to be consumed by vb.net
hi experts
we have a working process in c++ that is to be wrapped as a com dll and be called by a vb.net application.
i (the vb.net side), want to send some parameters to the C++ dll (as plain text, no problem here...), then have the c++ return the result as an ARRAY OF STRINGS
whar are the parameters type on the c++ side? and how does the C++ function declaration should look like so when consumed by vb.net will be recognized as string array?
hope this is clear enough
thanx in advance
Erez
we have a working process in c++ that is to be wrapped as a com dll and be called by a vb.net application.
i (the vb.net side), want to send some parameters to the C++ dll (as plain text, no problem here...), then have the c++ return the result as an ARRAY OF STRINGS
whar are the parameters type on the c++ side? and how does the C++ function declaration should look like so when consumed by vb.net will be recognized as string array?
hope this is clear enough
thanx in advance
Erez
ASKER
Thank you.
I'll have a go with it with my cpp guy and get back to you
I'll have a go with it with my cpp guy and get back to you
ASKER
dear MedievalWarrior
we need the c++ dll to be com compliant (it's to be managed with com+ with many, MANY concurrent insances)
what are the changes required for your code snippet to have the c++ be compatible as com-dll
thanks again
Erez
we need the c++ dll to be com compliant (it's to be managed with com+ with many, MANY concurrent insances)
what are the changes required for your code snippet to have the c++ be compatible as com-dll
thanks again
Erez
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
that surely catapults us in the right direction.
thanks a lot, mate
thanks a lot, mate
Great! It appears .NET translates the SAFEARRAY to the Array Class but I want to point out that you could also use a string array variable if you wanted.
Dim s As Array = c.MakeArray("Hello", "World")
// Could also be represented as below
Dim s() as String = c.MakeArray("Hello", "World")
Open in new window