BCB调用VC++的DLL的问题?
我在BCB中调用VC++的DLL,但是DLL中的函数是类与类函数,如何导出啊?
用如下方法只导出了函数,但是只要一计算就报错,显然还是要导出类才行啊!
int _stdcall (*abcd)(int,int);
void __fastcall TForm1::Button1Click(TObject *Sender)
{
HINSTANCE hInst=NULL;
hInst = LoadLibrary("my.dll");
if(hInst)
{
abcd =(int (__stdcall*)(int,int)) GetProcAddress(hInst,"Calculate");
Edit3->Text=IntToStr(abcd(StrToInt(Edit1->Text),StrToInt(Edit2->Text)));
FreeLibrary(hInst);
}
}