gpt4 book ai didi

Javascript 到 ActiveX 变量类型

转载 作者:行者123 更新时间:2023-11-28 11:00:17 25 4
gpt4 key购买 nike

ActiveX 对象方法具有此签名。

long DirectIO(long Command, long* pData, BSTR* pString)

Int32 DirectIO(Int32, Int32 ByRef, System.String ByRef)

我正在尝试从 javascript 调用此方法。我尝试了多种组合,但总是收到“类型不匹配”错误。

引用链接:

So why does VBScript produce a type mismatch error here? VBScriptdoesn't! The object produces the type mismatch error, which VBScriptdutifully reports. The object's implementation of Invoke calls thedefault implementation of Invoke provided for you by the type libraryimplementation. That thing says "I've got a reference to a variant,and that variant is a string. I need a reference to a string. That'sa type mismatch."

最佳答案

鉴于我在问题中提供的所有引用资料,当前的结论是不可能直接从 Javascript 调用该函数。

但是,可能存在替代方法(COM 代理/包装器)。

关于Javascript 到 ActiveX 变量类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1429737/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com