【发布时间】:2010-11-02 00:09:59
【问题描述】:
我有一个 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)
我迷路了。 Google 不想合作……希望这里有人能提供帮助!
罗伯
【问题讨论】:
标签: c# interop vbscript com-interop