简体   繁体   中英

Can I create an instance of a COM struct in javascript?

I'm writing a script in Javacript that is run from the command line using cscript.exe .

I have the following struct defined in a .NET assembly exposed to COM.

Definition in IDL:

typedef [uuid(CA667ABD-C702-49DD-BC23-E9A7F75081E5), version(1.0),
  custom(0F21F359-AB84-41E8-9A78-36D110E6D2F9, "MyApp.TestStruct")
]
struct tagTestStruct {

MyEnum MyEnumValue;

DATE Start;

} TestStruct;

I can instantiate COM objects from Javascript using WSH.CreateObject() fine. However, is it possible to somehow create an instance of a COM struct from Javascript?

似乎无法完成。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM