c 的dll中函数转DELPHI问题 5
extern"C"__declspec(dllexport)voidGetHTDevInfo(LONGindex,HNCA_DEVINFO*devInfo);THNCA_...
extern "C" __declspec(dllexport) void GetHTDevInfo(LONG index, HNCA_DEVINFO *devInfo);
THNCA_DEVINFO =packed record
StrDevName: array[0..256] of char;
RSAContainerName: array[0..256] of char;
RSASignCertBase64: array[0..2048] of char;
RSAEncryptCertBase64: array[0..2048] of char;
SM2ContainerName: array[0..256] of char;
SM2SignCertBase64: array[0..2048] of char;
SM2EncryptCertBase64: array[0..2048] of char;
end;
HNCA_DEVINFO = ^THNCA_DEVINFO;
procedure GetHTDevInfo(index:integer;devInfo:HNCA_DEVINFO);stdcall;external 'HCT_LIB.dll';
function CA_GetHTDevInfo(index:integer):HNCA_DEVINFO;
var rv:HNCA_DEVINFO;
begin
new(rv);
GetHTDevInfo(index,rv);
showmessage(rv.StrDevName);
Dispose(rv);
//result:=rv;
end;
那里错了,就是报错呀!!!!
c的声明
typedef struct _HNCA_DEVINFO
{
char strDevName[256];
char RSAContainerName[256];
char RSASignCertBase64[2048];
char RSAEncryptCertBase64[2048];
char SM2ContainerName[256];
char SM2SignCertBase64[2048];
char SM2EncryptCertBase64[2048];
}HNCA_DEVINFO; 展开
THNCA_DEVINFO =packed record
StrDevName: array[0..256] of char;
RSAContainerName: array[0..256] of char;
RSASignCertBase64: array[0..2048] of char;
RSAEncryptCertBase64: array[0..2048] of char;
SM2ContainerName: array[0..256] of char;
SM2SignCertBase64: array[0..2048] of char;
SM2EncryptCertBase64: array[0..2048] of char;
end;
HNCA_DEVINFO = ^THNCA_DEVINFO;
procedure GetHTDevInfo(index:integer;devInfo:HNCA_DEVINFO);stdcall;external 'HCT_LIB.dll';
function CA_GetHTDevInfo(index:integer):HNCA_DEVINFO;
var rv:HNCA_DEVINFO;
begin
new(rv);
GetHTDevInfo(index,rv);
showmessage(rv.StrDevName);
Dispose(rv);
//result:=rv;
end;
那里错了,就是报错呀!!!!
c的声明
typedef struct _HNCA_DEVINFO
{
char strDevName[256];
char RSAContainerName[256];
char RSASignCertBase64[2048];
char RSAEncryptCertBase64[2048];
char SM2ContainerName[256];
char SM2SignCertBase64[2048];
char SM2EncryptCertBase64[2048];
}HNCA_DEVINFO; 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询