如何用接口描述语言表达 int[] 属性?
如何在 IDL 中实现此属性:
public int[] Params
{
get
{
return _Params;
}
set
{
_Params = value;
}
}
我尝试了下面的 idl 代码,
[propget, helpstring("The click through parameters")]
HRESULT Params([out, retval] int *rVal);
[propput, helpstring("The click through parameters")]
HRESULT Params([in] int *RnewVal);
但我的编译器正在寻找此属性,
public int get_Params()
{
throw new NotImplementedException();
}
public void set_Params(ref int rVal)
{
throw new NotImplementedException();
}
我 99.999% 确定这是类型问题。
How would you implement this property in IDL:
public int[] Params
{
get
{
return _Params;
}
set
{
_Params = value;
}
}
I tried the idl code below
[propget, helpstring("The click through parameters")]
HRESULT Params([out, retval] int *rVal);
[propput, helpstring("The click through parameters")]
HRESULT Params([in] int *RnewVal);
But my compiler is looking for this
public int get_Params()
{
throw new NotImplementedException();
}
public void set_Params(ref int rVal)
{
throw new NotImplementedException();
}
I'm 99.999% sure it's a problem with the types.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
COM typelib 导入程序更喜欢处理符合自动化的接口,因此使用
SAFEARRAY
:COM typelib importer prefers to deal with Automation-compliant interfaces, so use
SAFEARRAY
: