眼白有痣的女人的烦恼:在delphi与pb中调用一个dll,声明怎么转换

来源:百度文库 编辑:高考问答 时间:2024/05/08 08:51:17
我在做一个程序时,它上面有一个列子,是用delphi做的,其中声明为function CancelCard(WhichCard : Integer) : Integer; far; external 'ic2000.dll' name 'CancelCard' ;我用pb声明为function
Function Int CancelCard( int WhichCard) library "ic2000.dll",
但是执行成功,却出了一个错,为:Application terminated.
Error:Specified argument type differs from required argument type at
runtime in Dll function cancelcard.(invalid stack pointer on return

from function call)
我错在哪啊,请大哥们帮忙!

delphi中DLL的函数必须用stdcall声明才能被其他程序调用
声明为far是不行的