नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
'type' : a class with the ComImport attribute cannot define member 'member', only abstract or dllimport functions are allowed
Remarks
A type that derived from ComImportAttribute cannot define member.
The /clr:pure and /clr:safe compiler options are deprecated in Visual Studio 2015 and unsupported in Visual Studio 2017.
Example
The following example generates C3808.
// C3808.cpp
// compile with: /c /clr:pure user32.lib
using namespace System::Runtime::InteropServices;
[System::Runtime::InteropServices::ComImportAttribute()]
ref struct S1 {
int f() {} // C3808
virtual int g() abstract; // OK
[DllImport("msvcrt.dll")]
int printf(System::String ^, int i); // OK
};