Class: Exerb::Win32::Struct::ImageFileHeader
- Defined in:
- lib/exerb/win32/struct/image_file_header.rb
Overview
#
Constant Summary collapse
- FORMAT =
'SSLLLSS'
Instance Attribute Summary collapse
-
#characteristics ⇒ Object
Returns the value of attribute characteristics.
-
#machine ⇒ Object
Returns the value of attribute machine.
-
#number_of_sections ⇒ Object
Returns the value of attribute number_of_sections.
-
#number_of_symbols ⇒ Object
Returns the value of attribute number_of_symbols.
-
#pointer_to_symbol_table ⇒ Object
Returns the value of attribute pointer_to_symbol_table.
-
#size_of_optional_header ⇒ Object
Returns the value of attribute size_of_optional_header.
-
#time_date_stamp ⇒ Object
Returns the value of attribute time_date_stamp.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize ⇒ ImageFileHeader
constructor
A new instance of ImageFileHeader.
- #pack ⇒ Object
- #unpack(bin) ⇒ Object
Methods inherited from Base
Constructor Details
#initialize ⇒ ImageFileHeader
Returns a new instance of ImageFileHeader.
23 24 25 26 27 28 29 30 31 |
# File 'lib/exerb/win32/struct/image_file_header.rb', line 23 def initialize @machine = 0 @number_of_sections = 0 @time_date_stamp = 0 @pointer_to_symbol_table = 0 @number_of_symbols = 0 @size_of_optional_header = 0 @characteristics = 0 end |
Instance Attribute Details
#characteristics ⇒ Object
Returns the value of attribute characteristics.
33 34 35 |
# File 'lib/exerb/win32/struct/image_file_header.rb', line 33 def characteristics @characteristics end |
#machine ⇒ Object
Returns the value of attribute machine.
33 34 35 |
# File 'lib/exerb/win32/struct/image_file_header.rb', line 33 def machine @machine end |
#number_of_sections ⇒ Object
Returns the value of attribute number_of_sections.
33 34 35 |
# File 'lib/exerb/win32/struct/image_file_header.rb', line 33 def number_of_sections @number_of_sections end |
#number_of_symbols ⇒ Object
Returns the value of attribute number_of_symbols.
33 34 35 |
# File 'lib/exerb/win32/struct/image_file_header.rb', line 33 def number_of_symbols @number_of_symbols end |
#pointer_to_symbol_table ⇒ Object
Returns the value of attribute pointer_to_symbol_table.
33 34 35 |
# File 'lib/exerb/win32/struct/image_file_header.rb', line 33 def pointer_to_symbol_table @pointer_to_symbol_table end |
#size_of_optional_header ⇒ Object
Returns the value of attribute size_of_optional_header.
33 34 35 |
# File 'lib/exerb/win32/struct/image_file_header.rb', line 33 def size_of_optional_header @size_of_optional_header end |
#time_date_stamp ⇒ Object
Returns the value of attribute time_date_stamp.
33 34 35 |
# File 'lib/exerb/win32/struct/image_file_header.rb', line 33 def time_date_stamp @time_date_stamp end |
Instance Method Details
#pack ⇒ Object
35 36 37 |
# File 'lib/exerb/win32/struct/image_file_header.rb', line 35 def pack return [@machine, @number_of_sections, @time_date_stamp, @pointer_to_symbol_table, @number_of_symbols, @size_of_optional_header, @characteristics].pack(FORMAT) end |
#unpack(bin) ⇒ Object
39 40 41 42 |
# File 'lib/exerb/win32/struct/image_file_header.rb', line 39 def unpack(bin) @machine, @number_of_sections, @time_date_stamp, @pointer_to_symbol_table, @number_of_symbols, @size_of_optional_header, @characteristics = bin.unpack(FORMAT) return self end |