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 Michael

Michael
Tue Jan 20 19:35:50 CST 2004

Olivier Jousset wrote:
> 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.


Note: These KB articles apply to any script host environment, not just ASP.

Q218454 - HOWTO: Implement Array Arguments in Visual C++ COM Objects for
Active Server Pages
http://support.microsoft.com/default.aspx?kbid=218454

Q217114 - HOWTO: Implement Array Arguments in Visual Basic COM Objects for
Active Server Pages
http://support.microsoft.com/default.aspx?kbid=217114



--
Michael Harris
Microsoft.MVP.Scripting

Windows 2000 Scripting Guide
Microsoft® Windows®2000 Scripting Guide
http://www.microsoft.com/technet/scriptcenter/scrguide/sagsas_overview.asp

TechNet Script Center Sample Scripts
http://www.microsoft.com/downloads/release.asp?ReleaseID=38942

WSH 5.6 documentation download
http://www.microsoft.com/downloads/details.aspx?FamilyId=01592C48-207D-4BE1-8A76-1C4099D7BBB9&displaylang=en