考虑以下接口定义:
[
//...
dual,
//...
]
interface IFoo : IDispatch{
}
[
//...
dual,
//...
]
interface IBar : IDispatch{
[propput, id(1)] HRESULT foo([in] IFoo* newVal);
};
我正在使用IBar在 JScript 中实现的对象:
myBar.foo = someFoo;// 到目前为止,一切都很好
foo我该如何设置null?
myBar.foo = null;// “类型不匹配”
myBar.foo = 0;// “类型不匹配”