已知DELPHI编写的DLL提供给我   SourceClear_Fun(pIntComPort:LongInt):LongInt;stdcall;export;而提供给我C#样列为[DllImport("DLL7000.dll")]
        public static extern int SourceClear_Fun(int comPort);我现在需要在VC中调用
typedef int (_cdecl *SourceClear_Fun_t)(int comPort);
HINSTANCE hinstDLL=NULL; 
hinstDLL=LoadLibrary("DLL7000.dll");
if (hinstDLL!=NULL)
{
SourceClear_Fun_t Proc;
Proc = (SourceClear_Fun_t)GetProcAddress (hinstDLL,"SourceClear_Fun");
int tmp;
tmp=Proc(comPort);
FreeLibrary(hinstDLL);
return tmp;
}
else
{
AfxMessageBox("装载DLL失败");
return -2;
}
怎么调用后程序终止,帮帮我看看什么原因