satype

指定 SAFEARRAY 结构的数据类型。

[ satype(
   data_type
) ]

参数

  • data_type
    参数形式传递给接口方法的 SAFEARRAY 数据结构的数据类型。

要求

属性上下文

适用对象

接口参数,接口方法

可重复

必需的特性

无效的特性

备注

satype C++ 特性指定 SAFEARRAY的数据类型。

说明说明

间接寻址从在生成的 .idl 文件的 SAFEARRAY 指针被删除从它在 .cpp 文件中声明。

示例

// cpp_attr_ref_satype.cpp
// compile with: /LD
#include "unknwn.h"
[module(name="MyModule")];
[dispinterface, uuid("00000000-0000-0000-0000-000000000001")]
__interface A {
   [id(1)] HRESULT MyMethod ([in, satype("BSTR")] SAFEARRAY **p);
};

请参见

参考

id

其他资源

编译器特性

参数属性

方案属性

Attributes Samples