Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int count = Marshal.SizeOf(typeof(SpellDBC_Record));
- byte[] readBuffer = new byte[count];
- readBuffer = reader.ReadBytes(count);
- handle = GCHandle.Alloc(readBuffer, GCHandleType.Pinned);
- body.records[i] = (SpellDBC_Record)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(SpellDBC_Record));
- handle.Free();
Advertisement
Add Comment
Please, Sign In to add comment