Use new little endian marshaller on media images.

This commit is contained in:
2019-02-27 23:57:52 +00:00
parent 45be793491
commit 0fe8e3c11f
54 changed files with 320 additions and 705 deletions

View File

@@ -55,11 +55,7 @@ namespace DiscImageChef.DiscImages
byte[] pHdrB = new byte[Marshal.SizeOf(pHdr)];
stream.Read(pHdrB, 0, Marshal.SizeOf(pHdr));
pHdr = new PartCloneHeader();
IntPtr headerPtr = Marshal.AllocHGlobal(Marshal.SizeOf(pHdr));
Marshal.Copy(pHdrB, 0, headerPtr, Marshal.SizeOf(pHdr));
pHdr = (PartCloneHeader)Marshal.PtrToStructure(headerPtr, typeof(PartCloneHeader));
Marshal.FreeHGlobal(headerPtr);
pHdr = Helpers.Marshal.ByteArrayToStructureLittleEndian<PartCloneHeader>(pHdrB);
DicConsole.DebugWriteLine("PartClone plugin", "pHdr.magic = {0}", StringHandlers.CToString(pHdr.magic));
DicConsole.DebugWriteLine("PartClone plugin", "pHdr.filesystem = {0}",