#[repr(C)]pub struct Cor20Header {
pub cb: u32,
pub major_runtime_version: u16,
pub minor_runtime_version: u16,
pub metadata: DataDirectory,
pub flags: u32,
pub entry_point_token_or_rva: u32,
pub resources: DataDirectory,
pub strong_name_signature: DataDirectory,
pub code_manager_table: DataDirectory,
pub vtable_fixups: DataDirectory,
pub export_address_table_jumps: DataDirectory,
pub managed_native_header: DataDirectory,
}Expand description
to .NET assemblies. This header is found in the COM descriptor directory of a PE file.
Fields§
§cb: u32The size of this structure in bytes.
major_runtime_version: u16Major runtime version number of the CLR.
minor_runtime_version: u16Minor runtime version number of the CLR.
metadata: DataDirectoryThe location and size of the metadata section, which contains metadata tables for the assembly, such as type definitions and member references.
flags: u32Flags that describe characteristics of the assembly (e.g., IL-only, 32-bit preferred).
Possible values:
entry_point_token_or_rva: u32Token or RVA of the entry point method for the assembly. For DLLs, this can be 0.
resources: DataDirectoryData directory specifying resources in the assembly.
strong_name_signature: DataDirectoryData directory containing the strong name signature of the assembly, if signed.
code_manager_table: DataDirectoryData directory for the code manager table, reserved for internal use.
vtable_fixups: DataDirectoryData directory for vtable fixups, used to fixup vtables in unmanaged code.
export_address_table_jumps: DataDirectoryData directory for export address table jumps, which can be used for interop.
managed_native_header: DataDirectoryData directory for a managed native header, reserved for future use.
Implementations§
Source§impl Cor20Header
impl Cor20Header
Sourcepub fn is_cb_correct(&self) -> bool
pub fn is_cb_correct(&self) -> bool
Returns true if Cor20Header::cb matches size of Cor20Header, otherwise false.
Sourcepub fn is_il_only(&self) -> bool
pub fn is_il_only(&self) -> bool
Whether the assembly contains only IL (Intermediate Language) code.
Sourcepub fn is_32bit_required(&self) -> bool
pub fn is_32bit_required(&self) -> bool
Whether the assembly requires a 32-bit environment to run.
Sourcepub fn is_il_library(&self) -> bool
pub fn is_il_library(&self) -> bool
Whether assembly is a library, not a standalone executable.
Sourcepub fn is_strong_name_signed(&self) -> bool
pub fn is_strong_name_signed(&self) -> bool
Whether assembly is signed with a strong name.
Sourcepub fn is_native_entrypoint(&self) -> bool
pub fn is_native_entrypoint(&self) -> bool
Whether the entry point for the assembly is a native method.
Sourcepub fn is_track_debug_data(&self) -> bool
pub fn is_track_debug_data(&self) -> bool
Whether debug information is tracked for the assembly.
Sourcepub fn is_32bit_preferred(&self) -> bool
pub fn is_32bit_preferred(&self) -> bool
Whether the assembly prefers a 32-bit environment if available.
Trait Implementations§
Source§impl Clone for Cor20Header
impl Clone for Cor20Header
Source§fn clone(&self) -> Cor20Header
fn clone(&self) -> Cor20Header
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Cor20Header
impl Debug for Cor20Header
Source§impl Default for Cor20Header
impl Default for Cor20Header
Source§fn default() -> Cor20Header
fn default() -> Cor20Header
Source§impl PartialEq for Cor20Header
impl PartialEq for Cor20Header
Source§fn eq(&self, other: &Cor20Header) -> bool
fn eq(&self, other: &Cor20Header) -> bool
self and other values to be equal, and is used by ==.