我有 C# 方法,它返回一个我希望能够从 VBScript 访问的字节数组。或多或少:
namespace ClassLibrary7
{
[ClassInterface(ClassInterfaceType.AutoDual)]
[Guid("63A77D29-DB8C-4733-91B6-3CC9C2D1340E")]
[ComVisible(true)]
public class Class1
{
public void Create(
out byte[] BinaryData
)
{
// do some work and return BinaryData
BinaryData = new byte[] { 1, 2, 3, 4 };
}
}
}
和 vbscript 看起来像:
dim o
dim b
set o = wscript.CreateObject("ClassLibrary7.Class1")
o.Create b
MsgBox ubound(b)
我迷路了。谷歌不想合作......我希望这里有人能提供帮助!
抢