c# - How to convert these two unmanaged structures to managed types? -
the first 1 in c++ namespace is
public struct channel_vars { int fetch_data; /* boolean flag */ void * data; /* (malloc'd) address of info */ unsigned int lines; /* number of lines returned */ }
i don't know void* supposed turn when managed
the sec 1 is
public struct hdf_call_vars_t { struct channel_vars p_vars; struct channel_vars s_vars; enum file_version file_vers; /* set in top level sub. used in lower */ int fetch_n; /* boolean flag */ s_line_header_t * n_addr; /* malloc'd address of ndata */ unsigned int n_lines; csdt_file_header_t hdr; };
in 1 above, s_line_header_t struct made of doubles , ints , construction made of basic types ints etc.
since managed code doesn't allow pointers, how convert these structures managed types? code in c++ -cli project. thanks, sb
you can utilize intptr class in managed code map field uses pointer on unmaged code
c# c++-cli
No comments:
Post a Comment