LibWrapper.taxStart();The unsuccessful call that results in the above error is
tt=LibWrapper.taxInit(tax_log,open_db,cache_size,fp,session_hdl);where
short tax_log = 0; short open_db = 0; int cache_size = 4800; file_path fp = new file_path(); long session_hdl = 1; taxes_tbl tt;The LibWrapper class is as follow:
class LibWrapper { [DllImport("tax.dll")] public static extern void taxStart(); [DllImport("tax.dll")] public static extern taxes_tbl taxInit(short tax_log, short open_db, int cache_size, file_path paths, long session_hdl);The structures of taxes_tbl and file_paths in the original c is as follows:
struct taxes_tbl { unsigned long int j_code; short int tax_type; short int tax_level; short int calc_type; float rate; double tax_amount; char *desc; short int TVcalc_type_id; short int TVsurcharge; short int TVtax_type_id[10]; short int TVtax_level_id[10]; }; struct file_path { char *Tax_data; char *Tax_IDX; char *Tax_DLL; char *Tax_log; char *Tax_npanxx; char *Tax_status; char *Tax_temp_file; char *Tax_location; char *Tax_zip; char *Tax_customer_key; char *Tax_pcode; char *Tax_jcode; char *Tax_over; };The c# compiler specifically complains about the "*" character in front of the structure members and the "[10]". I have removed both of these in my test. So I would guess that this is what is causing the error I get. But I don't know how to appropriately configure them. Any help would be appreciated.