Added marshaling of managed struct to and from C++ code