开发者

JScriptTypeInfo definition

开发者 https://www.devze.com 2023-01-23 21:03 出处:网络
I have the following code in VBScript: Dim control set control = CreateObject(\"MSScriptControl.ScriptControl\"开发者_如何学运维)

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?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消