Class: Exerb::Win32::Struct::ImageSectionHeader
- Defined in:
- lib/exerb/win32/struct/image_section_header.rb
Overview
#
Constant Summary collapse
- FORMAT =
'Z8LLLLLLSSL'
Instance Attribute Summary collapse
-
#characteristics ⇒ Object
Returns the value of attribute characteristics.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number_of_linenumbers ⇒ Object
Returns the value of attribute number_of_linenumbers.
-
#number_of_relocations ⇒ Object
Returns the value of attribute number_of_relocations.
-
#pointer_to_linenumbers ⇒ Object
Returns the value of attribute pointer_to_linenumbers.
-
#pointer_to_raw_data ⇒ Object
Returns the value of attribute pointer_to_raw_data.
-
#pointer_to_relocations ⇒ Object
Returns the value of attribute pointer_to_relocations.
-
#size_of_raw_data ⇒ Object
Returns the value of attribute size_of_raw_data.
-
#virtual_address ⇒ Object
Returns the value of attribute virtual_address.
-
#virtual_size ⇒ Object
(also: #physical_address)
Returns the value of attribute virtual_size.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ ImageSectionHeader
constructor
A new instance of ImageSectionHeader.
- #pack ⇒ Object
- #unpack(bin) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ ImageSectionHeader
Returns a new instance of ImageSectionHeader.
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 23 def initialize @name = "" @virtual_size = 0 @virtual_address = 0 @size_of_raw_data = 0 @pointer_to_raw_data = 0 @pointer_to_relocations = 0 @pointer_to_linenumbers = 0 @number_of_relocations = 0 @number_of_linenumbers = 0 @characteristics = 0 end |
Instance Attribute Details
#characteristics ⇒ Object
Returns the value of attribute characteristics.
36 37 38 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 36 def characteristics @characteristics end |
#name ⇒ Object
Returns the value of attribute name.
36 37 38 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 36 def name @name end |
#number_of_linenumbers ⇒ Object
Returns the value of attribute number_of_linenumbers.
36 37 38 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 36 def number_of_linenumbers @number_of_linenumbers end |
#number_of_relocations ⇒ Object
Returns the value of attribute number_of_relocations.
36 37 38 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 36 def number_of_relocations @number_of_relocations end |
#pointer_to_linenumbers ⇒ Object
Returns the value of attribute pointer_to_linenumbers.
36 37 38 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 36 def pointer_to_linenumbers @pointer_to_linenumbers end |
#pointer_to_raw_data ⇒ Object
Returns the value of attribute pointer_to_raw_data.
36 37 38 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 36 def pointer_to_raw_data @pointer_to_raw_data end |
#pointer_to_relocations ⇒ Object
Returns the value of attribute pointer_to_relocations.
36 37 38 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 36 def pointer_to_relocations @pointer_to_relocations end |
#size_of_raw_data ⇒ Object
Returns the value of attribute size_of_raw_data.
36 37 38 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 36 def size_of_raw_data @size_of_raw_data end |
#virtual_address ⇒ Object
Returns the value of attribute virtual_address.
36 37 38 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 36 def virtual_address @virtual_address end |
#virtual_size ⇒ Object Also known as: physical_address
Returns the value of attribute virtual_size.
36 37 38 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 36 def virtual_size @virtual_size end |
Instance Method Details
#pack ⇒ Object
38 39 40 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 38 def pack return [@name, @virtual_size, @virtual_address, @size_of_raw_data, @pointer_to_raw_data, @pointer_to_relocations, @pointer_to_linenumbers, @number_of_relocations, @number_of_linenumbers, @characteristics].pack(FORMAT) end |
#unpack(bin) ⇒ Object
42 43 44 45 |
# File 'lib/exerb/win32/struct/image_section_header.rb', line 42 def unpack(bin) @name, @virtual_size, @virtual_address, @size_of_raw_data, @pointer_to_raw_data, @pointer_to_relocations, @pointer_to_linenumbers, @number_of_relocations, @number_of_linenumbers, @characteristics = bin.unpack(FORMAT) return self end |