From 0105e6b4d9da0f0ea4b545537b506233ac4c2f1d Mon Sep 17 00:00:00 2001 From: Y4er <45418382@qq.com> Date: Thu, 26 Oct 2023 11:37:11 +0800 Subject: [PATCH] Update Example6.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit resolve System.InvalidOperationException:“Reloc section must be the last section, use AddSection() to add a section” --- Examples/Example6.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Examples/Example6.cs b/Examples/Example6.cs index 1a823fc18..d92add484 100644 --- a/Examples/Example6.cs +++ b/Examples/Example6.cs @@ -89,7 +89,7 @@ void OnWriterEvent(object sender, ModuleWriterEventArgs e) { case ModuleWriterEvent.PESectionsCreated: // Add a PE section var sect1 = new PESection(".dummy", 0x40000040); - e.Writer.Sections.Add(sect1); + e.Writer.AddSection(sect1); // Let's add data sect1.Add(new ByteArrayChunk(new byte[123]), 4); sect1.Add(new ByteArrayChunk(new byte[10]), 4);