C++/CLI でネイティブ ライブラリをラップしたいと考えています。プリミティブ型で動作します。ただし、次の場合はより複雑です。
interface ISampleInterface
{
void SampleMethod();
}
public ref class NativeClassWrapper {
NativeClass* m_nativeClass;
public:
NativeClassWrapper() { m_nativeClass = new NativeClass(); }
~NativeClassWrapper() { delete m_nativeClass; }
void Method(ISampleInterface ^i) {
???
m_nativeClass->Method(i);
}
};
これをラップする方法は?ネイティブ コード C++ は ISampleInterface 型を認識していないため... (仮想クラスと同じ質問)
ありがとうございます。