Sdílet prostřednictvím


Chyba kompilátoru C3807

'type' : třída s atributem ComImport nemůže odvodit z type2, je povolena pouze implementace rozhraní.

Poznámky

Typ odvozený z ComImportAttribute může implementovat pouze rozhraní.

Příklad

Následující příklad vygeneruje C3807.

// 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 {};