How to declare PEID_CERTIFICATE pData in API call where PEID_CERTIFICATE is Pointer to a structure in the call
EID_MAX_Certificate = 2048
certificateType DWORD
EID_API int WINAPI EidReadCertificate(PEID_CERTIFICATE pData, int certificateType);
typedef struct tagEID_CERTIFICATE
{
BYTE certificate[EID_MAX_Certificate];
int certificateSize;
} EID_CERTIFICATE, *PEID_CERTIFICATE;
EID_CERTIFICATE GROUP,TYPE
certificate BYTE,DIM(EID_MAX_Certificate)
certificateSize SIGNED
END
MAP
MODULE('')
EidReadCertificate (*EID_CERTIFICATE, SIGNED),SIGNED,PROC,RAW,PASCAL
END
END
I would add TYPE to the label the way C prefixes with “tag”. Also labels of parameters so they appear with Intellisense. Added call code example. Did this on my phone so …
EID_MAX_Certificate Equate(2048)
EID_CERTIFICATE_type GROUP,TYPE
certificate BYTE,DIM(EID_MAX_Certificate)
certificateSize SIGNED
END
MAP
MODULE('')
EidReadCertificate (*EID_CERTIFICATE_type pData, SIGNED certificateType),SIGNED,PROC,RAW,PASCAL,dll(1)
END
END
Blargggg Procedure()
EDIcert Like(EID_CERTIFICATE_type)
CertType Signed
RV Signed
Code
EDIcert.certificateSize = Size(EDIcert) !Wrong ?
RV = EidReadCertificate( EDIcert, certType)
Dear also,
Thank you for your valuable and quick reply. I’ll now test it. Keep you posted.
Djordje

I think that line is Not required.
That kind of Struct Size is always first. Read the documentation on this call. It probably is set to the number of the 2000 Bytes used.