ms_union
控制非擷取聯集的網路資料表示對齊方式。
語法
[ms_union]
備註
ms_union C++ 屬性的功能與 MIDL 屬性ms_union 相同 。
範例
下列程式碼顯示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")];
需求
屬性內容 | 值 |
---|---|
適用於 | 非capsulated 等位 |
可重複 | No |
必要屬性 | 無 |
無效屬性 | dispinterface |
如需詳細資訊,請參閱 屬性內容。
另請參閱
意見反映
https://aka.ms/ContentUserFeedback。
即將推出:我們會在 2024 年淘汰 GitHub 問題,並以全新的意見反應系統取代並作為內容意見反應的渠道。 如需更多資訊,請參閱:提交及檢視以下的意見反映: