delphi 调用c++ dll问题(100分)

  • 主题发起人 主题发起人 showphee
  • 开始时间 开始时间
S

showphee

Unregistered / Unconfirmed
GUEST, unregistred user!
DRIVER_API int &nbsp;GetTime ( int device , int devicegroup , int * year , int * month , int * day , int * dayweek , int * hour , int * minute , int * sec ) ;<br>DRIVER_API int &nbsp;GetAllUsers ( int device , int devicegroup , BYTE *ubuff,int *len,int *count ) ;<br>DRIVER_API int &nbsp;GetUserByCardNo ( long cardno , int device , int devicegroup , char *rname,long *rcardno,long *rid &nbsp;)<br>DRIVER_API int &nbsp;GetCardNo ( int device , int devicegroup , int * wgcode , long * cardno ) &nbsp;;<br>DRIVER_API int &nbsp;GetAllAttendanceRecords ( int device , int devicegroup , BYTE *rbbuff,int *len,int *rcount);<br>以上是c++定义函数原形<br>1/在delphi中如何使用以上函数类型?<br>2/int *,char *,long *,char *,BYTE * 是代表什么意思?
 
function &nbsp;GetTime(machineNo:Integer;MachineGroup:integer; Var yy:PInteger; Var mm:PInteger; Var d:PInteger; Var hh:PInteger; Var min:PInteger; Var sec:PInteger):integer;stdcall;<br>function SetTime(year,month,day,hour,minute,second,deviceno,devicegroup:integer):integer;stdcall;<br>implementation<br>function GetTime;external 'CyDriver.dll';<br>function SetTime;external 'CyDriver.dll';
 
怎么没有动态连接库的高手啊!!!!!!!!!!!1
 
int &nbsp;xxxx &nbsp;用 &nbsp;xxxx:integer;<br>int &nbsp;*xxx &nbsp;--&gt; var xxx:integer;
 
DRIVER_API int &nbsp;GetTime ( int device , int devicegroup , int * year , int * month , int * day , int * dayweek , int * hour , int * minute , int * sec ) ;<br><br>function GetTime(device:integer, deviceGroup: int, var year: integer, var month:integer, ... var sec:integer): Integer; stdcall;<br><br>是否是 stdcall 需要自己判断。
 
楼主不是已经改成pascal,接下来调用就好了啊
 
偷懒的话使用这个转换:<br>http://codecentral.borland.com/Item.aspx?id=15444
 
后退
顶部