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

ReadInt16() public method

public ReadInt16 ( ) : short
return short
        public short ReadInt16()
        {
            return (short) ReadUInt16 ();
        }

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::ReadInt16