stoneharry

Untitled

Apr 18th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | None | 0 0
  1. int count = Marshal.SizeOf(typeof(SpellDBC_Record));
  2. byte[] readBuffer = new byte[count];
  3. readBuffer = reader.ReadBytes(count);
  4. handle = GCHandle.Alloc(readBuffer, GCHandleType.Pinned);
  5. body.records[i] = (SpellDBC_Record)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(SpellDBC_Record));
  6. handle.Free();
Advertisement
Add Comment
Please, Sign In to add comment