wire_marshal

指定在传输将使用而不是一个特定的数据类型的数据类型。

[wire_marshal]

备注

wire_marshal C++ 特性具有与 wire_marshal MIDL 属性相同。

示例

下面的代码演示 wire_marshal的使用:

// cpp_attr_ref_wire_marshal.cpp
// compile with: /LD
#include "windows.h"
[module(name="MyLibrary")];

[export, public] typedef unsigned long _FOUR_BYTE_DATA;

[export] typedef struct _TWO_X_TWO_BYTE_DATA {
   unsigned short low;
   unsigned short high;
} TWO_X_TWO_BYTE_DATA ;

[export, wire_marshal(TWO_X_TWO_BYTE_DATA)] typedef _FOUR_BYTE_DATA FOUR_BYTE_DATA;

要求

属性上下文

适用对象

typedef

可重复

必需的特性

无效的特性

有关属性上下文的更多信息,请参见 属性上下文

请参见

其他资源

IDL 特性

Typedef、Enum、Union 和 Struct 特性

Attributes Samples