i am trying to use various unmanaged code in manged code, one of the situation which concerns me is this :
in my c/c++ class i have a structure, this structure contains many nested structure, many int's, char's, char *, char** as its variables in its declaration. which are all initialized after running my c/c++ code.
eg of my structure in c/c++ :
struct my_company {
int total_emp;
char *country;
struct account_branch **ac_branch;
struct sales_branch *s_branch;
char *location;
equipment eqp;
};
struct account_branch {
unsigned int type;
int *accountants;
char *acc_location;
};
my other nested structure of my_company can be seen as my struct account_branch.
now i run my c/c++ code function and declare my struct as :
struct my_company *local_company;
after some processing i fill up all the values of it now i have my structure variable local_company which contains address of memory location where it has been holding values of various of its variables, i want to pass this location to my c# (wrapper class method),
my questions are :
1.)Is it possible to pass such a reference without losing any data
2.)how would i do it if so
3.)please explain me as i am new to c++/clr.
Thanks.