Not
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
typ: en klass med attributet ComImport kan inte härledas från "type2", endast gränssnittsimplementering tillåts
Anmärkningar
En typ som härleds från ComImportAttribute kan bara implementera ett gränssnitt.
Example
I följande exempel genereras 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 {};