My code is a quite as following:

DIM TaskCardList(10)
....
TaskCardList(0) = "toto"
etc ....
AGTM.AddTask TaskCardList,10

The COM server expects an array of string. Unfortunately, the COM server is
not able to retrieve the item of the array.

What's wrong? ( we manage both client script and server).

A similar code works with VC++ and DElphi client.

Any help will be appreciated.

RE: Vbscript array used as parameter to a COM method by maxv

maxv
Wed Jan 21 08:49:16 CST 2004

When I create com objects that are going to receive information from VBS, I
build in code to handle just about every contengency. Sometimes VBS will
give me a variant containing an array, sometimes is a variant containing
another variant that contains the array.

I have not been able to completely decpher exactly why it does this. So, I
handle it my C++ Com code.

I just assume I am not gauranteed the variant that I expect, and look for
the other possible Variants that could be sent.

Sincerely,
Max Vaughn [MSFT]
Microsoft Developer Support


Disclaimer: This posting is provided "AS IS" with no warranties, and
confers no rights. You assume all risk for your use.