Hi,
I am writing a component in VC++ for VBScript. I want to write a function that returns an a SAFEARRAY. How can I do that ? What should I write in the IDL file ?
Thanks,
Ofer
Printable View
Hi,
I am writing a component in VC++ for VBScript. I want to write a function that returns an a SAFEARRAY. How can I do that ? What should I write in the IDL file ?
Thanks,
Ofer
As far as I am concerned,it is impossible!Because
VBScript can't pass parameter by reference
IDL file definition :
GetData([in,out]SAFEARRAY(BSTR) *psa,[out,retval]long *p_retval);
Implementation :
GetData(SAFEARRAY **psa,long *p_retval)
{
.....
}
In VBscript :
Dim strArray(0 to n) as string
Dim retval as Long
retval = comObj.GetData(strArray);
Regards,
The Beret.