Delphi怎样才能用stdcall的方式调用VC写的DLL?
bokei 2001-05-03 10:11:00 在WIN2000(p) SP1,Delphi5.0+sp1,vc 6.0 +sp4下
Delphi:
function Test(a1,b1:Integer):Integer;cdecl;external 'F:\TestCode\DLL\Release\dll.dll';
VC:
//头文件
extern "C"
{
DllExport int Test(int a1,int b1);
}
//源文件
DllExport int Test(int a1,int b1)
{
return a1*10+b1;
}
时一切正常.
但是当变成如下情况:
Delphi:
function Test(a1,b1:Integer):Integer;stdcall;external 'F:\TestCode\DLL\Release\dll.dll';
VC:
//头文件
extern "C"
{
DllExport int __stdcall Test(int a1,int b1);
}
//源文件
DllExport int __stdcall Test(int a1,int b1)
{
return a1*10+b1;
}
提示无法定位输入点Test,为什么??怎样才能使用stdcall的方式,而不是cdecl