Home > database >  Call DLL in pb in a parameter array structure using wrong, didn't feel array initialization
Call DLL in pb in a parameter array structure using wrong, didn't feel array initialization

Time:04-24

Structures in c + + is the

Typedef struct clientinfo_insuinfo_ret_struct {
Int insuinforecordscount;
Double * balc;
Char * * insutype;
Char * * psn_type;
Char * * psn_insu_stas;
Char * * psn_insu_date;
Char * * paus_insu_date;
Char * * cvlserv_flag;
Char * * insuplc_admdvs;
Char * * emp_name;

} clientinfo_insuinfo_ret_struct;

So I write a structure to invoke it in PB

$PBExportHeader $clientinfo_insuinfo_ret_struct. SRS
Global type clientinfo_insuinfo_ret_struct from structure
Long insuinforecordscount
Double balc []
String insutype []
String psn_type []
String psn_insu_stas []
String psn_insu_date []
String paus_insu_date []
String cvlserv_flag []
String insuplc_admdvs []
String emp_name []
End type



My calling code is

Clientinfo_insuinfo_ret_struct cirs1
Long ll_row
//trying to initialize the array
For ll_row=1 to 50
Cirs1. Balc [ll_row]=0.0
Cirs1. Insutype [ll_row]=space (10)
Cirs1. Psn_type [ll_row]=space (10)
Cirs1. Psn_insu_stas [ll_row]=space (10)
Cirs1. Psn_insu_date [ll_row]=space (30)
Cirs1. Paus_insu_date [ll_row]=space (30)
Cirs1. Cvlserv_flag [ll_row]=space (10)
Cirs1. Insuplc_admdvs [ll_row]=space (10)
Cirs1. Emp_name [ll_row]=space (200)

Next
Cirs1. Insuinforecordscount=0

Long ll_ret

Ll_ret=fun (cirs1)

Under the PB see feeling is initialized, see if it had been initialized when debugging the





This is when the PB call pictures, I saw an array in vc + + debugging didn't initialization, because I saw a lot of 0 x00000??????? Can compare the following directly by the c + + call memory picture cirs1. The balc [0] to collect value directly collapsed,


This is normal c + + call picture
  • Related