[Mono-list] Issue with Interop

Andreas Färber andreas.faerber at web.de
Thu May 21 04:19:12 EDT 2009


Am 21.05.2009 um 08:29 schrieb weismat:

> A Marshal.Sizeof showed me that uint was translated to 4 instead of  
> the
> required 8 bytes

uint (System.UInt32) is always 4 bytes, even on 64-bit systems,  
similar to uint32_t.
ulong (System.UInt64) is always 8 bytes, similar to uint64_t.
If you need an adapting size, try UIntPtr.

Andreas

> - is there a simple flag to force a 64 translation or
> should I enforce the translation with precompiler statements?
> I confirmed that zlib is built with 64 bit size as well via a simple C
> program.
> -- 
> View this message in context: http://www.nabble.com/Issue-with-Interop-tp23629942p23648529.html
> Sent from the Mono - General mailing list archive at Nabble.com.
>
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list



More information about the Mono-list mailing list