Parent

Included Modules

Files

Class/Module Index [+]

Quicksearch

Chef::Util::Windows

Protected Instance Methods

dword_to_i(buffer, offset) click to toggle source
# File lib/chef/util/windows.rb, line 46
def dword_to_i(buffer, offset)
  buffer[offset*PTR_SIZE,PTR_SIZE].unpack('i')[0] || 0
end
lpwstr_to_s(buffer, offset) click to toggle source
# File lib/chef/util/windows.rb, line 40
def lpwstr_to_s(buffer, offset)
  str = 0.chr * (256 * 2) #XXX unhardcode this length (*2 for WCHAR)
  wcscpy str, buffer[offset*PTR_SIZE,PTR_SIZE].unpack('L')[0]
  wide_to_multi str
end
str_to_ptr(v) click to toggle source

return pointer for use with pack('L')

# File lib/chef/util/windows.rb, line 51
def str_to_ptr(v)
  [v].pack('p*').unpack('L')[0]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.