But now I want to do the reverse. Call a method with a variable number
of variants and have the called method fill them in.
Hello all,
I've written a method which, using VBScript, accepts a variable number of arguments, which is described in the IDL as follows :
[vararg] HRESULT Put([in] SAFEARRAY(VARIANT) aList);
But now I want to do the reverse. Call a method with a variable number of variants and have the called method fill them in.
To be clear about it :
1) I do /not/ want to return a fixed number of results.
2) I do /not/ want the method to return an array and than pick my results outof that array.
IOW, I want to be able to use :
Put(Var1,Var2,Var3, ...) '<-- This already works
and than :
Get(Var1,Var2,Var3, ...)
Question : is what I'm after at all possible ?
Regards,
Rudy Wieser
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.
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 :-)
Functions' out arguments are just pointers to a buffer for the function
to fill.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 42:26:55 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,857,851 |