共用方式為


編譯器警告 (層級 1) C4096

'a': 介面不是 COM 介面;不會發出給 IDL

您可能預期為 COM 介面的介面定義未定義為 COM 介面,因此不會發出至 IDL 檔案。

如需指出介面是 COM 介面的清單屬性,請參閱 介面屬性

下列範例會產生 C4096:

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

// [object, uuid("00000000-0000-0000-0000-000000000001")]
__interface a
{
};

[coclass, uuid("00000000-0000-0000-0000-000000000002")]
struct b : a
{
};   // C4096, remove coclass or uncomment object