delphi怎么调用DLL函数(C语言) Delphi / Windows SDK/API http://www.delphi2007.net/DelphiAPI/html/delphi_20061109111537269.html
函数原型(C): 函数定义: long GetBasicInfo_Block(LPARAM pReserved,struct Log_BASICINFOARRAY *pLgBas); 参数: pReserved:未用 pLgBas:基本信息内容(输出) struct Log_BASICINFOARRAY{ char bDoc[10]; char bID[18]; char bName[20]; char bSex; char bAddress[60]; char bVehicleType[4]; char bTel[16]; long bFirstTestDate; long bAvailableDate; // 发卡日期,如20041202 long bReleaseDate; // 有效日期,如20041202 }; 在delphi中怎么引用 Record 怎么余struct 对应;(char类型,到delphi中应是怎样的)
来人救命啊!
Type TLog_BASICINFOARRAY=record bDoc:array[0..9] of Char; bIDA:array[0..17] of Char; bName:array[0..19] of Char; bSex:Char; bAddress:array[0..59] of Char; bVehicleType:array[0..3] of Char; bTel[16]:array[0..15] of Char; bFirstTestDate:Double; bAvailableDate:Double; // 发卡日期,如20041202 bReleaseDate:Double; // 有效日期,如20041202 end; function GetBasicInfo_Block(pReserved:LongInt;pLgBas:PLog_BASICINFOARRAY):Double;stdcall;external 'DLL name' 这个试试
Type PLog_BASICINFOARRAY = ^TLog_BASICINFOARRAY; TLog_BASICINFOARRAY = Packed Record bDoc:array[0..9] of Char; bIDA:array[0..17] of Char; bName:array[0..19] of Char; bSex:Char; bAddress:array[0..59] of Char; bVehicleType:array[0..3] of Char; bTel[16]:array[0..15] of Char; bFirstTestDate: Longint; long bAvailableDate: Longint; // 发卡日期,如20041202 long bReleaseDate: Longint; // 有效日期,如20041202 end; function GetBasicInfo_Block(pReserved:LongInt;pLgBas:PLog_BASICINFOARRAY):integer;stdcall
|
请发表评论