IntPtr p = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Dummy)));
Marshal.StructureToPtr(dummy, p, false);
- if(Marshal.ReadInt32(p, 0) != 0x64636261) {
+ if(Marshal.ReadByte(p, 0) != 0x61) {
+ return 1;
+ }
+ if(Marshal.ReadByte(p, 1) != 0x62) {
+ return 1;
+ }
+ if(Marshal.ReadByte(p, 2) != 0x63) {
+ return 1;
+ }
+ if(Marshal.ReadByte(p, 3) != 0x64) {
return 1;
}
return 0;