Compiler Error C3807
'type' : a class with the ComImport attribute cannot derive from 'type2', only interface implementation is allowed
A type that derived from ComImportAttribute can only implement an interface.
Example
The following sample generates 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 {};
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for