PEHeaderBuilder Konstruktor
Definicja
Ważny
Niektóre informacje dotyczą produktów przedpremierowych, które mogą zostać znacznie zmodyfikowane przed premierą. Microsoft nie udziela żadnych gwarancji, ani wyraźnych, ani domniemanych, dotyczących informacji podanych tutaj.
Inicjuje nowe wystąpienie klasy PEHeader.
public PEHeaderBuilder(System.Reflection.PortableExecutable.Machine machine = System.Reflection.PortableExecutable.Machine.Unknown, int sectionAlignment = 8192, int fileAlignment = 512, ulong imageBase = 4194304, byte majorLinkerVersion = 48, byte minorLinkerVersion = 0, ushort majorOperatingSystemVersion = 4, ushort minorOperatingSystemVersion = 0, ushort majorImageVersion = 0, ushort minorImageVersion = 0, ushort majorSubsystemVersion = 4, ushort minorSubsystemVersion = 0, System.Reflection.PortableExecutable.Subsystem subsystem = System.Reflection.PortableExecutable.Subsystem.WindowsCui, System.Reflection.PortableExecutable.DllCharacteristics dllCharacteristics = System.Reflection.PortableExecutable.DllCharacteristics.DynamicBase | System.Reflection.PortableExecutable.DllCharacteristics.NoSeh | System.Reflection.PortableExecutable.DllCharacteristics.NxCompatible | System.Reflection.PortableExecutable.DllCharacteristics.TerminalServerAware, System.Reflection.PortableExecutable.Characteristics imageCharacteristics = System.Reflection.PortableExecutable.Characteristics.Dll, ulong sizeOfStackReserve = 1048576, ulong sizeOfStackCommit = 4096, ulong sizeOfHeapReserve = 1048576, ulong sizeOfHeapCommit = 4096);
new System.Reflection.PortableExecutable.PEHeaderBuilder : System.Reflection.PortableExecutable.Machine * int * int * uint64 * byte * byte * uint16 * uint16 * uint16 * uint16 * uint16 * uint16 * System.Reflection.PortableExecutable.Subsystem * System.Reflection.PortableExecutable.DllCharacteristics * System.Reflection.PortableExecutable.Characteristics * uint64 * uint64 * uint64 * uint64 -> System.Reflection.PortableExecutable.PEHeaderBuilder
Public Sub New (Optional machine As Machine = System.Reflection.PortableExecutable.Machine.Unknown, Optional sectionAlignment As Integer = 8192, Optional fileAlignment As Integer = 512, Optional imageBase As ULong = 4194304, Optional majorLinkerVersion As Byte = 48, Optional minorLinkerVersion As Byte = 0, Optional majorOperatingSystemVersion As UShort = 4, Optional minorOperatingSystemVersion As UShort = 0, Optional majorImageVersion As UShort = 0, Optional minorImageVersion As UShort = 0, Optional majorSubsystemVersion As UShort = 4, Optional minorSubsystemVersion As UShort = 0, Optional subsystem As Subsystem = System.Reflection.PortableExecutable.Subsystem.WindowsCui, Optional dllCharacteristics As DllCharacteristics = System.Reflection.PortableExecutable.DllCharacteristics.DynamicBase | System.Reflection.PortableExecutable.DllCharacteristics.NoSeh | System.Reflection.PortableExecutable.DllCharacteristics.NxCompatible | System.Reflection.PortableExecutable.DllCharacteristics.TerminalServerAware, Optional imageCharacteristics As Characteristics = System.Reflection.PortableExecutable.Characteristics.Dll, Optional sizeOfStackReserve As ULong = 1048576, Optional sizeOfStackCommit As ULong = 4096, Optional sizeOfHeapReserve As ULong = 1048576, Optional sizeOfHeapCommit As ULong = 4096)
Parametry
- machine
- Machine
Architektura procesora CPU maszyny docelowej.
- sectionAlignment
- Int32
Wyrównanie (w bajtach) sekcji podczas ich ładowania do pamięci. Musi być większy lub równy fileAlignment. Wartość domyślna to rozmiar strony dla architektury.
- fileAlignment
- Int32
Współczynnik wyrównania (w bajtach) używany do wyrównania nieprzetworzonych danych sekcji w pliku obrazu. Wartość powinna być mocą 2 z zakresu od 512 do 64K włącznie. Wartość domyślna to 512. Jeśli wartość sectionAlignment jest mniejsza niż rozmiar strony architektury, musi być fileAlignment zgodna z sectionAlignmentwartością .
- imageBase
- UInt64
Preferowany adres pierwszego bajtu obrazu podczas ładowania do pamięci; musi mieć wielokrotność 64K.
- majorLinkerVersion
- Byte
Numer wersji głównej konsolidatora.
- minorLinkerVersion
- Byte
Numer wersji pomocniczej konsolidatora.
- majorOperatingSystemVersion
- UInt16
Numer wersji głównej wymaganego systemu operacyjnego.
- minorOperatingSystemVersion
- UInt16
Numer wersji pomocniczej wymaganego systemu operacyjnego.
- majorImageVersion
- UInt16
Numer wersji głównej obrazu.
- minorImageVersion
- UInt16
Numer wersji pomocniczej obrazu.
- majorSubsystemVersion
- UInt16
Numer wersji głównej podsystemu.
- minorSubsystemVersion
- UInt16
Numer wersji pomocniczej podsystemu.
- subsystem
- Subsystem
Podsystem wymagany do uruchomienia obrazu.
- dllCharacteristics
- DllCharacteristics
Obiekt opisujący cechy biblioteki linków dynamicznych.
- imageCharacteristics
- Characteristics
Obiekt opisujący cechy obrazu.
- sizeOfStackReserve
- UInt64
Rozmiar stosu do zarezerwowania. Zatwierdzane jest tylko sizeOfStackCommit to, że reszta jest udostępniana jednej stronie w danym momencie do momentu osiągnięcia rozmiaru rezerwy.
- sizeOfStackCommit
- UInt64
Rozmiar stosu do zatwierdzenia.
- sizeOfHeapReserve
- UInt64
Rozmiar lokalnego miejsca sterty do zarezerwowania. Zatwierdzane jest tylko sizeOfHeapCommit to, że reszta jest udostępniana jednej stronie w danym momencie do momentu osiągnięcia rozmiaru rezerwy.
- sizeOfHeapCommit
- UInt64
Rozmiar lokalnego obszaru sterty do zatwierdzenia.
Wyjątki
fileAlignment nie jest mocą 2 z zakresu od 512 do 64K.
-lub-
sectionAlignment nie moc 2.
-lub-
sectionAlignment wartość jest mniejsza niż fileAlignment.