○ActiveXの呼び出し
■呼び出すActiveX
VB6にて作成されています
プロジェクト名 Project1
クラス名 Class1
ファイル名 Project1.dll
Public Function inaba(a As Integer, b As Integer)
inaba = a * b
End Function
■上のActiveXの呼び出し
Solution ExplorerのReferencesに上のActiveXを追加します
int _tmain(){
Interop::Project1::Class1Class *obj=new Interop::Project1::Class1Class();
short a=10;
short b=20;
Object*c=obj->inaba(&a,&b);
Console::WriteLine(c->ToString());
return 0;
}
処理結果
200