ms_union

控制網路資料表示對齊,nonencapsulated 的聯集。

[ms_union]

備註

Ms_union C++ 屬性具有相同的功能,為 ms_union MIDL 屬性。

範例

下列程式碼顯示的位置 ms_union

// cpp_attr_ref_ms_union.cpp
// compile with: /LD
#include <unknwn.h>
[object, ms_union, uuid("00000000-0000-0000-0000-000000000001")]
__interface IFireTabCtrl {
   HRESULT DisplayString([in, string] char * p1);
};

[export, switch_type(short)] union _WILLIE_UNION_TYPE  {
   [case(24)]
      float fMays;
   [case(25)]
      double dMcCovey;
   [default]
      int x;
 };

[public] typedef _WILLIE_UNION_TYPE WILLIE_UNION_TYPE;

[module(name="ATLFIRELib")];

需求

屬性內容

適用於

Nonencapsulated 的等位

可重複

必要的屬性

None

無效的屬性

dispinterface

如需詳細資訊,請參閱屬性內容

請參閱

其他資源

IDL 屬性

Typedef、 列舉、 等位,以及結構屬性

Attributes Samples