Changed signature of ReadWrite interface - from ref int to IntPtr - to allow passing a null reference