Share via


ms_union

Steuert die Ausrichtung der Netzwerk Informationsdarstellung von nonencapsulated Unions.

[ms_union]

Hinweise

Das Attribut ms_union C++ verfügt über die gleichen Funktionen wie das ms_union MIDL-Attribut.

Beispiel

Der folgende Code zeigt die Platzierung von ms_unionan:

// 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")];

Anforderungen

Attribut-Kontext

Betrifft

Nonencapsulated-Unionen

Wiederholbar

Nein

Erforderliche Attribute

None

Ungültige Attribute

dispinterface

Weitere Informationen finden Sie unter Attribut-Kontexte.

Siehe auch

Weitere Ressourcen

IDL-Attribute

TypeDef-, Enumeration, Union und Struktur-Attribute

Attributes Samples