コード例 #1
0
        static void walChecksumBytes(bool nativeChecksum, WalIndexHeader header, byte[] checksum, byte[] checksumOut)
        {
            int size = Marshal.SizeOf(header);
            var b    = new byte[size];
            var p    = Marshal.AllocHGlobal(size);

            Marshal.StructureToPtr(header, p, true);
            Marshal.Copy(p, b, 0, size);
            Marshal.FreeHGlobal(p);
            walChecksumBytes(nativeChecksum, b, size, checksum, checksumOut);
        }
コード例 #2
0
ファイル: Wal.cs プロジェクト: BclEx/GpuData
 static void walChecksumBytes(bool nativeChecksum, WalIndexHeader header, byte[] checksum, byte[] checksumOut)
 {
     int size = Marshal.SizeOf(header);
     var b = new byte[size];
     var p = Marshal.AllocHGlobal(size);
     Marshal.StructureToPtr(header, p, true);
     Marshal.Copy(p, b, 0, size);
     Marshal.FreeHGlobal(p);
     walChecksumBytes(nativeChecksum, b, size, checksum, checksumOut);
 }