共用方式為


編譯器錯誤 C3115

「屬性」:「建構」上不允許此屬性

屬性已套用至非預期的建構。 如需詳細資訊,請參閱 依使用方式 的屬性。

範例

下列範例會產生 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();
};