Greetings Experts!
I'm hoping someone can help me with an odd issue I'm having passing an array from VBScript to an ActiveX control. I have no issues passing arrays back to VBScript but when I pass an array to the control I would expect a VT_ARRAY or VT_SAFEARRAY of BSTRs. I am not seeing this and hence am unable to retrieve anything
IDL
[id(1), helpstring("method CreateArchive")] HRESULT CreateArchive([in] BSTR archive, [in] VARIANT fileList);
Method:
STDMETHODIMP CFoo::CreateArchive(BSTR archive, VARIANT fileList)
{
if (fileList.vt == (VT_ARRAY | VT_BSTR))
{
OutputDebugString(L"Array Received");
}
else
{
OutputDebugString(L"VARIAN
T type unexpected");
}
return S_OK;
}
VBScript
<script type="text/vbscript">
Dim myArray(3)
myArray(0) = "C:\File1"
myArray(1) = "C:\File2"
myArray(2) = "C:\File3"
myArray(3) = "C:\File4"
Foo.CreateArchive "FooZip.zip", myArray
</script>
Any insight into what may be going on is appreciated.