Mono.Cecil.PE.ByteBuffer.ReadInt32 C# (CSharp) Method

ReadInt32() public method

public ReadInt32 ( ) : int
return int
        public int ReadInt32()
        {
            return (int) ReadUInt32 ();
        }

Usage Example

Esempio n. 1
0
        public ImageDebugDirectory GetDebugHeader(out byte [] header)
        {
            var section = GetSectionAtVirtualAddress(Debug.VirtualAddress);
            var buffer  = new ByteBuffer(section.Data);

            buffer.position = (int)(Debug.VirtualAddress - section.VirtualAddress);

            var directory = new ImageDebugDirectory {
                Characteristics  = buffer.ReadInt32(),
                TimeDateStamp    = buffer.ReadInt32(),
                MajorVersion     = buffer.ReadInt16(),
                MinorVersion     = buffer.ReadInt16(),
                Type             = buffer.ReadInt32(),
                SizeOfData       = buffer.ReadInt32(),
                AddressOfRawData = buffer.ReadInt32(),
                PointerToRawData = buffer.ReadInt32(),
            };

            buffer.position = (int)(directory.AddressOfRawData - section.VirtualAddress);

            header = new byte [directory.SizeOfData];
            Buffer.BlockCopy(buffer.buffer, buffer.position, header, 0, header.Length);

            return(directory);
        }
All Usage Examples Of Mono.Cecil.PE.ByteBuffer::ReadInt32