Module: Unknownr::Windows::COM::Instance
- Defined in:
- lib/unknownr.rb
Class Method Summary collapse
Class Method Details
.[](iface) ⇒ Object
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/unknownr.rb', line 159 def self.[](iface) Class.new(iface) { send(:include, Helpers) def initialize(pointer) self.pointer = pointer @vtbl = self.class::VTBL.new(self[:lpVtbl]) end attr_reader :vtbl self::VTBL.members.each { |name| define_method(name) { |*args| raise "#{self}.#{name} failed." if Windows.FAILED(result = @vtbl[name].call(self, *args)); result } } } end |