Class: Exerb::Win32::Struct::ImageResourceDataEntry

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

Overview

#

Constant Summary collapse

FORMAT =
'LLLL'

Instance Attribute Summary collapse

Attributes inherited from Base

#position

Instance Method Summary collapse

Methods inherited from Base

read, #read, #size, #update

Constructor Details

#initializeImageResourceDataEntry

Returns a new instance of ImageResourceDataEntry



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

def initialize
  super()
  @offset_to_data = 0
  @size_of_data   = 0
  @code_page      = 0
  @reserved       = 0
end

Instance Attribute Details

#code_pageObject

Returns the value of attribute code_page



31
32
33
# File 'lib/exerb/win32/struct/image_resource_data_entry.rb', line 31

def code_page
  @code_page
end

#offset_to_dataObject

Returns the value of attribute offset_to_data



31
32
33
# File 'lib/exerb/win32/struct/image_resource_data_entry.rb', line 31

def offset_to_data
  @offset_to_data
end

#reservedObject

Returns the value of attribute reserved



31
32
33
# File 'lib/exerb/win32/struct/image_resource_data_entry.rb', line 31

def reserved
  @reserved
end

#size_of_dataObject

Returns the value of attribute size_of_data



31
32
33
# File 'lib/exerb/win32/struct/image_resource_data_entry.rb', line 31

def size_of_data
  @size_of_data
end

Instance Method Details

#packObject



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

def pack
  return [@offset_to_data, @size_of_data, @code_page, @reserved].pack(FORMAT)
end

#unpack(bin) ⇒ Object



37
38
39
40
# File 'lib/exerb/win32/struct/image_resource_data_entry.rb', line 37

def unpack(bin)
  @offset_to_data, @size_of_data, @code_page, @reserved = bin.unpack(FORMAT)
  return self
end