Hi all !
I am trying to pass a 1-dim-array from VBScript to a C#-Class
(COM-Interop-Functionality is set to true).
The function responds and works correctly, but I have problems as soon as I
want to pass an array to it.
My Function-Decl looks as follows:
********FunctionDeclaration********
public bool ImportDataFile(string Filename, string Separator, ref object[]
ColumnDefiniton)
********END********
The following VBScript-Call doesn't work:
********VBScript********
Set xtest = CreateObject(<ClassName>)
MyVar2 = Array(10,20,30,40)
Result = xtest.ImportDataFile("c:\temp\test.txt","-", MyVar2)
Set xtest = nothing
********END********
but the following works:
********VBScript********
Set xtest = CreateObject(<ClassName>)
Result = xtest.ImportDataFile("c:\temp\test.txt","-", Array(10,20,30,40))
Set xtest = nothing
********END********
What is my fault at VBScript Nr1 ?
Thanks
Alexander
Alexander - 28 May 2004 10:01 GMT
Function-Decl has to be
public bool ImportDataFile(string Filename, string Separator, object
ColumnDefiniton)
> Hi all !
>
[quoted text clipped - 32 lines]
> Thanks
> Alexander