Home > Back-end >  Want to use the vc call a Delphi DLL, not adjustable. Don't know how to write function declarat
Want to use the vc call a Delphi DLL, not adjustable. Don't know how to write function declarat

Time:10-30

Like the function GetBatchNo (const mCertifyInt: CertifyInt) : BatchNoInfo; Stdcall; This statement,
Is said that the function of the function name is GetBatchNo, his parameters mCertifyInt CertifyInt type,
The value returned from this function is BatchNoInfo this type, is this meaning?

The type of the types of parameters and return values as follows, do I want to use c + + call, how to write the function pointer in c + +, to declare the function, can call right?

//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
//Namespace: CertifyInt: CertifyInt
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
CertifyInt=class
Private
FcardPassword: WideString;//drug purchasing card password
FmedCardNo: WideString;//buy medicine card number
Published
The property cardPassword: WideString read FcardPassword write FcardPassword;
The property medCardNo: WideString read FmedCardNo write FmedCardNo;
end;


//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
//Namespace: BatchNoInfo: BatchNoInfo
//number of single information
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *//
BatchNoInfo=class
Private
FstateFlag: WideString;//0 - returns success, 1 - return failure, 2 - unauthorized
FserialNo: WideString;//return to identify the number of transaction serial number, must be stored permanently in the pharmacy database
FbatchNo: WideString;//return the batch number of
Published
The property stateFlag: WideString read FstateFlag write FstateFlag;
The property serialNo used to: WideString read FserialNo write FserialNo;
The property batchNo: WideString read FbatchNo write FbatchNo;
end;

CodePudding user response:

CertifyInt Delphi own class, you can't use

CodePudding user response:

The
refer to the original poster zxshhuman response:
as the function GetBatchNo (const mCertifyInt: CertifyInt) : BatchNoInfo; Stdcall; This statement,
Is said that the function of the function name is GetBatchNo, his parameters mCertifyInt CertifyInt type,
The value returned from this function is BatchNoInfo this type, is this meaning?

This understanding is correct, but the two types are class of Delphi, c + + with no,,
Or you will switch to record type
  • Related