Passing Parameters (value and reference types):
http://msdn.microsoft.com/library/defau ... meters.asp
Passing Parameters with ref:
http://msdn.microsoft.com/library/defau ... lrfref.asp
Passing Parameters with out:
http://msdn.microsoft.com/library/defau ... lrfout.asp
NOTE: I believe passing parameters with the out keyword is the solution for dllimporting functions with reference types. Maybe try this:
In C++:
void func(type& t) { t.val = someVal; }
In C#:
// dll import
void func(out type t);
type t;
func(out t);
Something like that anyway. Check the links above to make sure I got it right, then test.
