次の方法で共有


コンパイラ エラー C3386

'type-name' : __declspec(dllexport)/__declspec(dllimport) を WinRT 型には適用できません

注釈

dllimportdllexport__declspec 修飾子は、マネージド型または Windows ランタイム型では有効でありません。

Example

次の例では C3386 が生成され、その修正方法が示されています。

// C3386.cpp
// compile with: /clr /c
ref class __declspec(dllimport) X1 {   // C3386
// try the following line instead
// ref class X1 {
};