Class: Exerb::Win32::Struct::ImageResourceDirectory

Inherits:
Base
  • Object
show all
Defined in:
lib/exerb/win32/struct/image_resource_directory.rb

Overview

#

Constant Summary collapse

FORMAT =
'LLSSSS'

Instance Attribute Summary collapse

Attributes inherited from Base

#position

Instance Method Summary collapse

Methods inherited from Base

read, #read, #size, #update

Constructor Details

#initializeImageResourceDirectory

Returns a new instance of ImageResourceDirectory


23
24
25
26
27
28
29
30
31
# File 'lib/exerb/win32/struct/image_resource_directory.rb', line 23

def initialize
  super()
  @characteristics        = 0
  @time_date_stamp        = 0
  @major_version          = 0
  @minor_version          = 0
  @number_of_name_entries = 0
  @number_of_id_entries   = 0
end

Instance Attribute Details

#characteristicsObject

Returns the value of attribute characteristics


33
34
35
# File 'lib/exerb/win32/struct/image_resource_directory.rb', line 33

def characteristics
  @characteristics
end

#major_versionObject

Returns the value of attribute major_version


33
34
35
# File 'lib/exerb/win32/struct/image_resource_directory.rb', line 33

def major_version
  @major_version
end

#minor_versionObject

Returns the value of attribute minor_version


33
34
35
# File 'lib/exerb/win32/struct/image_resource_directory.rb', line 33

def minor_version
  @minor_version
end

#number_of_id_entriesObject

Returns the value of attribute number_of_id_entries


33
34
35
# File 'lib/exerb/win32/struct/image_resource_directory.rb', line 33

def number_of_id_entries
  @number_of_id_entries
end

#number_of_name_entriesObject

Returns the value of attribute number_of_name_entries


33
34
35
# File 'lib/exerb/win32/struct/image_resource_directory.rb', line 33

def number_of_name_entries
  @number_of_name_entries
end

#time_date_stampObject

Returns the value of attribute time_date_stamp


33
34
35
# File 'lib/exerb/win32/struct/image_resource_directory.rb', line 33

def time_date_stamp
  @time_date_stamp
end

Instance Method Details

#packObject


35
36
37
# File 'lib/exerb/win32/struct/image_resource_directory.rb', line 35

def pack
  return [@characteristics, @time_date_stamp, @major_version, @minor_version, @number_of_name_entries, @number_of_id_entries].pack(FORMAT)
end

#unpack(bin) ⇒ Object


39
40
41
42
# File 'lib/exerb/win32/struct/image_resource_directory.rb', line 39

def unpack(bin)
  @characteristics, @time_date_stamp, @major_version, @minor_version, @number_of_name_entries, @number_of_id_entries = bin.unpack(FORMAT)
  return self
end