Class: Exerb::Win32::Struct::VsFixedFileInfo

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

Overview

#

Constant Summary collapse

FORMAT =
'LLLLLLLLLLLLL'

Instance Attribute Summary collapse

Attributes inherited from Base

#position

Instance Method Summary collapse

Methods inherited from Base

read, #read, #size, #update

Constructor Details

#initializeVsFixedFileInfo

Returns a new instance of VsFixedFileInfo.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/exerb/win32/struct/vs_fixed_file_info.rb', line 23

def initialize
  super()
  @signature          = 0
  @struct_version     = 0
  @file_version_ms    = 0
  @file_version_ls    = 0
  @product_version_ms = 0
  @product_version_ls = 0
  @file_flags_mask    = 0
  @file_flags         = 0
  @file_os            = 0
  @file_type          = 0
  @file_subtype       = 0
  @file_date_ms       = 0
  @file_date_ls       = 0
end

Instance Attribute Details

#file_date_lsObject

Returns the value of attribute file_date_ls.



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

def file_date_ls
  @file_date_ls
end

#file_date_msObject

Returns the value of attribute file_date_ms.



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

def file_date_ms
  @file_date_ms
end

#file_flagsObject

Returns the value of attribute file_flags.



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

def file_flags
  @file_flags
end

#file_flags_maskObject

Returns the value of attribute file_flags_mask.



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

def file_flags_mask
  @file_flags_mask
end

#file_osObject

Returns the value of attribute file_os.



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

def file_os
  @file_os
end

#file_subtypeObject

Returns the value of attribute file_subtype.



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

def file_subtype
  @file_subtype
end

#file_typeObject

Returns the value of attribute file_type.



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

def file_type
  @file_type
end

#file_version_lsObject

Returns the value of attribute file_version_ls.



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

def file_version_ls
  @file_version_ls
end

#file_version_msObject

Returns the value of attribute file_version_ms.



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

def file_version_ms
  @file_version_ms
end

#product_version_lsObject

Returns the value of attribute product_version_ls.



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

def product_version_ls
  @product_version_ls
end

#product_version_msObject

Returns the value of attribute product_version_ms.



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

def product_version_ms
  @product_version_ms
end

#signatureObject

Returns the value of attribute signature.



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

def signature
  @signature
end

#struct_versionObject

Returns the value of attribute struct_version.



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

def struct_version
  @struct_version
end

Instance Method Details

#file_versionObject



51
52
53
# File 'lib/exerb/win32/struct/vs_fixed_file_info.rb', line 51

def file_version
  return format('%x.%x.%x.%x', @file_version_ms >> 16, @file_version_ms & 0x0000FFFF, @file_version_ls >> 16, @file_version_ls & 0x0000FFFF)
end

#packObject



42
43
44
# File 'lib/exerb/win32/struct/vs_fixed_file_info.rb', line 42

def pack
  return [@signature, @struct_version, @file_version_ms, @file_version_ls, @product_version_ms, @product_version_ls, @file_flags_mask, @file_flags, @file_os, @file_type, @file_subtype, @file_date_ms, @file_date_ls].pack(FORMAT)
end

#product_versionObject



55
56
57
# File 'lib/exerb/win32/struct/vs_fixed_file_info.rb', line 55

def product_version
  return format('%x.%x.%x.%x', @product_version_ms >> 16, @product_version_ms & 0x0000FFFF, @product_version_ls >> 16, @product_version_ls & 0x0000FFFF)
end

#unpack(bin) ⇒ Object



46
47
48
49
# File 'lib/exerb/win32/struct/vs_fixed_file_info.rb', line 46

def unpack(bin)
  @signature, @struct_version, @file_version_ms, @file_version_ls, @product_version_ms, @product_version_ls, @file_flags_mask, @file_flags, @file_os, @file_type, @file_subtype, @file_date_ms, @file_date_ls = bin.unpack(FORMAT)
  return self
end