diff options
-rw-r--r-- | mcs/class/Mono.PEToolkit/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/Mono.PEToolkit/Section.cs | 15 |
2 files changed, 17 insertions, 2 deletions
diff --git a/mcs/class/Mono.PEToolkit/ChangeLog b/mcs/class/Mono.PEToolkit/ChangeLog index 6defd1f0f35..bc39b0839eb 100644 --- a/mcs/class/Mono.PEToolkit/ChangeLog +++ b/mcs/class/Mono.PEToolkit/ChangeLog @@ -1,3 +1,7 @@ +2003-02-22 Jackson Harper <jackson@latitudegeo.com> + + * Section.cs: Add method for writing Sections + 2003-02-21 Jackson Harper <jackson@latitudegeo.com> * Section.cs: Add Method to write Headers diff --git a/mcs/class/Mono.PEToolkit/Section.cs b/mcs/class/Mono.PEToolkit/Section.cs index 3b8be55ee5d..76e011e6050 100644 --- a/mcs/class/Mono.PEToolkit/Section.cs +++ b/mcs/class/Mono.PEToolkit/Section.cs @@ -170,8 +170,6 @@ namespace Mono.PEToolkit { }
}
-
-
/// <summary>
/// </summary>
public void Read(BinaryReader reader)
@@ -196,6 +194,19 @@ namespace Mono.PEToolkit { hdr = new Header (reader);
}
+ public void Write (BinaryWriter writer)
+ {
+ sbyte[] name_bytes = new sbyte[8];
+
+ for (int i=0; i<name.Length; i++)
+ writer.Write ((sbyte) name[i]);
+
+ for (int i=name.Length; i<8; i++)
+ writer.Write ((sbyte) 0);
+
+ hdr.Write (writer);
+ }
+
}
}
|