
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 0.84 KB | hits: 15 | expires: Never
def ole_methods
members = []
all_methods(@typeinfo) do |ti, oti, desc, docs, name|
members << WIN32OLE_METHOD.new(nil, name, ti, oti, desc.memid)
nil
end
members
end
def all_methods(typeinfo, *args, &block) # MRI: olemethod_from_typeinfo
# Find method in this type.
ret = find_all_methods_in(nil, typeinfo, *args, &block)
return ret if ret
# Now check all other type impls
typeinfo.impl_types_count.times do |i|
begin
href = typeinfo.get_ref_type_of_impl_type(i)
ref_typeinfo = typeinfo.get_ref_type_info(href)
ret = find_all_methods_in(typeinfo, ref_typeinfo, *args, &block)
return ret if ret
rescue ComFailException => e
puts "Error getting impl types #{e}"
end
end
nil
end