JJ,
I haven't seen any programming language whose function can actually
return multiple values without placing them in some kind of a container
or an interface.
:-) As you might know I mostly write Assembly. In it returning multiple results is as easy as supplying pointers to the respective "variables"
(read: memory areas) to a function.
Or, as it is called in several programming languages, providing the argument "by reference" (instead of the more common "by value").
Ofcourse, there has been a great push to banish "by reference" arguments, as its is much harder to prove that programs which use them do not have un-intended side effects (at least, that is what I've been told by someone
who studied for it).
But as a quick test I just tried this method :
HRESULT GetTest(out] variant* var1,[out] variant* var2);
and it works fine.
IOW, thats the second language you now know which can do it. p :-)
-- but --
It turns out I made a simple mistake, making it /look/ as if my OCX didn't
work : while I provided three different variables I displayed the first one twice followed by the third one. And as I test-stored my result in the
second variable ... :-|
Regards,
Rudy Wieser
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)