编译器错误 C3115

“attribute”:“construct”上不允许使用此属性

不打算应用特性的构造应用了特性。 有关详细信息,请参阅按用法划分的特性

示例

下面的示例生成 C3115。

// C3115.cpp
// compile with: /c
#include <unknwn.h>
[module(name="xx")];

[object, helpstringdll(xx.dll), uuid("00000000-0000-0000-0000-000000000001")]   // C3115
// try the following line instead
// [object, uuid("00000000-0000-0000-0000-000000000001")]
__interface IMyI {
   HRESULT xx();
};