7

I have the following code in VBScript:

 Dim control
 set control = CreateObject("MSScriptControl.ScriptControl")
 control.language = "jscript"
 control.addCode("function test() { return {property: 'test'}; };")
 Dim result
 set result = control.Eval("test();")

I know that the object returned to result is of the type JScriptTypeInfo but I can't find any information regarding the definition of this type and doing similar code in Visual Studio C# only shows this up as {System.__ComObject} in the locals pane.

Does anyone know what the interface to the JScriptTypeInfo type is?

  • I have answered this question here http://stackoverflow.com/questions/37711112/in-excel-vba-on-windows-for-parsed-json-variables-what-is-this-jscripttypeinfo – S Meaden Dec 26 '16 at 20:47

2 Answers2

1

There's a similar thread on this forum about a similar problem, maybe it can help you out.

Kyle
  • 65,599
  • 28
  • 144
  • 152
1

I'll tell you what I did to deal with this type, since I had access to the original JScript classic ASP pages that I was reading. The JScriptTypeInfo object was created when a new String() statement (ex: Session( "Data" ) = new String( "Test");) was used in the ASP page. If the session object was created with just a String() statement (ex: Session( "Data" ) = String( "Test");), then VB.NET can convert the type just fine.

For what it's worth.

GDP
  • 8,109
  • 6
  • 45
  • 82
K Carr
  • 11
  • 1