WriteInt32() public method

public WriteInt32 ( int value ) : void
value int
return void
コード例 #1
0
 private void WriteResourceDataEntries(ResourceDirectory directory, ref int offset)
 {
     foreach (ResourceEntry entry in directory.Entries)
     {
         if (entry.Data != null)
         {
             win32_resources.WriteUInt32((uint)(rsrc.VirtualAddress + offset));
             win32_resources.WriteInt32(entry.Data.Length);
             win32_resources.WriteUInt32(entry.CodePage);
             win32_resources.WriteUInt32(entry.Reserved);
             offset += (entry.Data.Length + 3) & ~3;
         }
         else
         {
             WriteResourceDataEntries(entry.Directory, ref offset);
         }
     }
 }
コード例 #2
0
ファイル: CodeReader.cs プロジェクト: bladecoding/cecil
        void PatchRawFatSection(ByteBuffer buffer, MetadataBuilder metadata)
        {
            position--;
            var length = ReadInt32 ();
            buffer.WriteInt32 (length);

            var count = (length >> 8) / 24;

            PatchRawExceptionHandlers (buffer, metadata, count, true);
        }
コード例 #3
0
ファイル: CodeReader.cs プロジェクト: bladecoding/cecil
        void PatchRawFatMethod(ByteBuffer buffer, MethodSymbols symbols, CodeWriter writer, out MetadataToken local_var_token)
        {
            var flags = ReadUInt16 ();
            buffer.WriteUInt16 (flags);
            buffer.WriteUInt16 (ReadUInt16 ());
            symbols.code_size = ReadInt32 ();
            buffer.WriteInt32 (symbols.code_size);
            local_var_token = ReadToken ();

            if (local_var_token.RID > 0) {
                var variables = symbols.variables = ReadVariables (local_var_token);
                buffer.WriteUInt32 (variables != null
                    ? writer.GetStandAloneSignature (symbols.variables).ToUInt32 ()
                    : 0);
            } else
                buffer.WriteUInt32 (0);

            PatchRawCode (buffer, symbols.code_size, writer);

            if ((flags & 0x8) != 0)
                PatchRawSection (buffer, writer.metadata);
        }
コード例 #4
0
ファイル: CryptoService.cs プロジェクト: peterwald/cecil
        static void PatchChecksum(Stream stream, int checksum)
        {
            stream.Seek (0xd8, SeekOrigin.Begin);
            var buffer = new ByteBuffer (4);
            buffer.WriteInt32 (checksum);

            stream.Write (buffer.buffer, 0, 4);
        }