Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Problem dealing with arrays in VBScript

0
0
I've come across this same issue. Would it be possible to implement support for this? I'm trying to migrate away from the MS Script Control (used as an ActiveX control in .NET) to ClearScript using VBScriptEngine, and everything is working perfectly apart from this one issue. There are already customer scripts out there that expect to be able to receive arrays in VBScript from the host application, so we need to be able to preserve that behaviour.

Basically I would like to be able to call:

object[] array = new object[] { ...... };
engine.Script.MyFunction(array);

and have "array" pass through to VBScript properly.

I'm also having problems trying to access a C# function from VBScript that returns data through an array. I can do the following in MSScriptControl, but not with ClearScript:

Dim x
Dim y
funcs.GetArray x, y

public void getLogData(ref dynamic x, ref object y)
{
x = new int[5];
y = 10;
}

It's the "ref" that ClearScript seems not to like. Is this a particularly difficult problem to solve?

Thanks very much for the great work on ClearScript, it's a fantastic bit of software!

Viewing all articles
Browse latest Browse all 2297