On Mon, 2008-11-03 at 09:41 -0800, Bradford Stephens wrote:
> I believe you still have to use the Marshaling in order to get an IntPtr.

Yes, but marshaling an IntPtr doesn't require copying the entire buffer.
Marshaling as a System.String *does* require copying the entire buffer.

4 bytes is clearly less than 100kB+. :-)

So unless you really need a System.String, you could instead use IntPtr
and use the System.Runtime.InteropServices.Marshal methods to interact
with the unmanaged string, or you could use unsafe code and cast the
IntPtr to a byte* for memory manipulation...

 - Jon


_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to