The problem is clearly described in https://rdotnet.codeplex.com/discussions/458695
* Brush up on Marshal and P/Invoke options to see what's feasible
* Have tests, unit tests (regression tests) preferably
Comments: http://msdn.microsoft.com/en-us/library/aa288468%28v=vs.71%29.aspx