Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteImportTable()

void System.Reflection.PortableExecutable.ManagedTextSection.WriteImportTable ( BlobBuilder builder,
int importTableRva,
int importAddressTableRva )
inlineprivate

Definition at line 227 of file ManagedTextSection.cs.

228 {
229 int count = builder.Count;
230 int num = importTableRva + 40;
231 int num2 = num + (Is32Bit ? 12 : 16);
232 int value = num2 + 12 + 2;
233 builder.WriteUInt32((uint)num);
234 builder.WriteUInt32(0u);
235 builder.WriteUInt32(0u);
236 builder.WriteUInt32((uint)value);
237 builder.WriteUInt32((uint)importAddressTableRva);
238 builder.WriteBytes(0, 20);
239 if (Is32Bit)
240 {
241 builder.WriteUInt32((uint)num2);
242 builder.WriteUInt32(0u);
243 builder.WriteUInt32(0u);
244 }
245 else
246 {
247 builder.WriteUInt64((uint)num2);
248 builder.WriteUInt64(0uL);
249 }
250 builder.WriteUInt16(0);
251 string corEntryPointName = CorEntryPointName;
252 foreach (char c in corEntryPointName)
253 {
254 builder.WriteByte((byte)c);
255 }
256 builder.WriteByte(0);
257 }
void WriteBytes(byte value, int byteCount)

References System.Reflection.PortableExecutable.ManagedTextSection.CorEntryPointName, System.count, System.Reflection.Metadata.BlobBuilder.Count, System.Reflection.PortableExecutable.ManagedTextSection.Is32Bit, System.value, System.Reflection.Metadata.BlobBuilder.WriteBytes(), System.Reflection.Metadata.BlobBuilder.WriteUInt16(), System.Reflection.Metadata.BlobBuilder.WriteUInt32(), and System.Reflection.Metadata.BlobBuilder.WriteUInt64().

Referenced by System.Reflection.PortableExecutable.ManagedTextSection.Serialize().