class Unknownr::Windows::PROPVARIANT
Public Class Methods
[](t, *v)
click to toggle source
# File lib/unknownr.rb, line 646 def self.[](t, *v) new.tap { |var| var.send("#{t}=", *v) } end
Public Instance Methods
bool()
click to toggle source
# File lib/unknownr.rb, line 648 def bool; raise 'Wrong type tag.' unless self[:vt] == VT_BOOL; self[:boolVal] != 0 end
bool=(bool)
click to toggle source
# File lib/unknownr.rb, line 649 def bool=(bool) self[:vt] = VT_BOOL; self[:boolVal] = (bool) ? -1 : 0 end
decimal()
click to toggle source
# File lib/unknownr.rb, line 679 def decimal raise 'Wrong type tag.' unless self[:vt] == VT_DECIMAL Rational(self[:decVal][:Lo64], 10 ** self[:decVal][:scale]) + self[:decVal][:Hi32] end
decimal=(decimal)
click to toggle source
# File lib/unknownr.rb, line 685 def decimal=(decimal) self[:vt] = VT_DECIMAL; self[:decVal][:Lo64] = decimal end
int()
click to toggle source
# File lib/unknownr.rb, line 651 def int; raise 'Wrong type tag.' unless self[:vt] == VT_I4; self[:intVal] end
int=(int)
click to toggle source
# File lib/unknownr.rb, line 652 def int=(int) self[:vt] = VT_I4; self[:intVal] = int end
uint()
click to toggle source
# File lib/unknownr.rb, line 654 def uint; raise 'Wrong type tag.' unless self[:vt] == VT_UI4; self[:uintVal] end
uint=(uint)
click to toggle source
# File lib/unknownr.rb, line 655 def uint=(uint) self[:vt] = VT_UI4; self[:uintVal] = uint end
unknown() { |unknown| ... }
click to toggle source
# File lib/unknownr.rb, line 657 def unknown raise 'Wrong type tag.' unless self[:vt] == VT_UNKNOWN yield Unknown.new(self[:punkVal]) ensure Windows.PropVariantClear(self) end
unknown=(unknown)
click to toggle source
# File lib/unknownr.rb, line 665 def unknown=(unknown) self[:vt] = VT_UNKNOWN; self[:punkVal] = unknown.pointer; unknown.AddRef end
wstring()
click to toggle source
# File lib/unknownr.rb, line 667 def wstring; raise 'Wrong type tag.' unless self[:vt] == VT_LPWSTR; Windows.WCSTOMBS(self[:pwszVal]) end
wstring=(string)
click to toggle source
# File lib/unknownr.rb, line 669 def wstring=(string) self[:vt] = VT_LPWSTR FFI::MemoryPointer.new(:pointer) { |p| Windows.DetonateHresult(:SHStrDup, string, p) self[:pwszVal] = p.read_pointer } end