13,825
社区成员
发帖
与我相关
我的任务
分享
void __fastcall TForm1::ShowDLLaboutClick(TObject *Sender)
{
HINSTANCE ins;
ins = LoadLibrary("./dll/mkabout.dll");
try
{
if(ins == NULL)
throw MyException("Can't Load Library!");
FARPROC proc;
proc = GetProcAddress(ins,"_myAbout"); //一个什么也不做的form
if(proc == NULL)
{
FreeLibrary(ins);
throw MyException("Can't Get Proc Address!");
}
proc();
if(!FreeLibrary(ins))
{
throw MyException("Can't Free!");
}
}
catch (MyException &myException)
{
ShowMessage(myException.test);
}
}