“type-name”:
__declspec(dllexport)/__declspec(dllimport)不能应用于托管类型或 WinRT 类型
注解
dllimport 和 dllexport__declspec 修饰符在托管类型或 Windows 运行时类型上无效。
Example
以下示例生成 C3386,并演示如何修复它:
// C3386.cpp
// compile with: /clr /c
ref class __declspec(dllimport) X1 { // C3386
// try the following line instead
// ref class X1 {
};