|this is in my c++ file
public ref class Class1
(const char * file_path,
hdf_call_vars_t & ret_vals) ;
and from c# I call it like so (unsafe code)
string str = "C:\\a.h5";
byte bytes = Encoding.ASCII.GetBytes(str);
fixed (byte* p = bytes)
sbyte* sp = (sbyte*)p;
DoAT.Class1 cl = new DoAT.Class1();
cl.read_file(sp, ref ret_vals);
It does not compile sayiing the c++ is expecting a pointer to a structure. I thought making it an & is the same as passing by ref?
p.s. the c++ is a managed dll and I add it as a reference in the c# program.
modified 12-Feb-13 23:53pm.