大家好,我这2天碰到了这个问题,DLL是用PB写的,我调用里面的函数。分别定义如下:
========================函数在PB中引用========================
--函数定义
FUNCTION UnsignedInteger ICC_Open_Port(int Port)  LIBRARY "ICC_32.DLL"
FUNCTION UnsignedInteger ICC_Close_Port( )  LIBRARY "ICC_32.DLL"
FUNCTION UnsignedInteger ICC_Verify(UnsignedInteger Lc,ref string Pin)  LIBRARY "ICC_32.DLL"
--读卡函数 返回值第一个串为卡号
FUNCTION UnsignedInteger GetPersonalInfo(ref string Info) LIBRARY "ICC_32.DLL"========================函数在Dephi中引用========================
  function ICC_Open_Port(Port: LongInt): Cardinal; stdcall; external 'ICC_32.DLL';
  function ICC_Close_Port(): Cardinal; stdcall; external 'ICC_32.DLL';
  function ICC_Verify(Lc: Cardinal;var Pin: PChar): Cardinal; stdcall; external 'ICC_32.DLL';
  function GetPersonalInfo(var Info: PChar): Cardinal; stdcall; external 'ICC_32.DLL';========================Delphi引用===============================
在ICC_Open_Port和ICC_Close_Port都是正常的,而在ICC_Verify和GetPersonalInfo就是不能正常返回数值,且调用函数返回值也是失败。请教大家是否引用定义错了,传 动态数组参数?紧急寻求大家帮助!谢谢