Teilen über


Compilerfehler C3807

'type' : Eine Klasse mit dem ComImport-Attribut kann nicht von 'type2' abgeleitet werden, es ist nur die Schnittstellenimplementierung zulässig.

Bemerkungen

Ein vom Typ abgeleiteter ComImportAttribute Typ kann nur eine Schnittstelle implementieren.

Beispiel

Im folgenden Beispiel wird C3807 generiert.

// C3807.cpp
// compile with: /clr /c
ref struct S {};
interface struct I {};

[System::Runtime::InteropServices::ComImportAttribute()]
ref struct S1 : S {};   // C3807
ref struct S2 : I {};