Class: WIN32OLE_TYPELIB
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
SafeStringValue, WIN32OLE_TYPEValue, all_methods, all_vars, find_all_methods_in, find_all_typeinfo, load_typelib, methods_with_flag, reg_each_key_for, registry_subkey, search_registry, typedesc_value, typeinfo_from_ole, typelib_registry_each_guid_version
Constructor Details
Returns a new instance of WIN32OLE_TYPELIB.
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/win32ole/win32ole_typelib.rb', line 10
def initialize(*args)
if args.length == 2
@typelib, @name = *args
puts "NO TYPELIB! for #{@name} #{@version}" unless @typelib
elsif args.length == 1
@name = args[0]
@typelib = search_registry(@name) end
end
|
Instance Attribute Details
#name ⇒ Object
Also known as:
to_s
Returns the value of attribute name.
7
8
9
|
# File 'lib/win32ole/win32ole_typelib.rb', line 7
def name
@name
end
|
#typelib ⇒ Object
Returns the value of attribute typelib.
6
7
8
|
# File 'lib/win32ole/win32ole_typelib.rb', line 6
def typelib
@typelib
end
|
Class Method Details
.ole_classes(typelib) ⇒ Object
57
58
59
|
# File 'lib/win32ole/win32ole_typelib.rb', line 57
def ole_classes(typelib)
new(typelib).ole_classes
end
|
.typelibs ⇒ Object
61
62
63
64
65
66
67
68
69
70
71
72
|
# File 'lib/win32ole/win32ole_typelib.rb', line 61
def typelibs
typelibs = []
typelib_registry_each_guid_version do |guid, version, reg|
name = reg.read(nil)[1] || ''
registry_subkey(reg, 'win32', 'win64') do |arch_reg, arch|
type_lib = load_typelib(arch_reg, arch)
typelibs << WIN32OLE_TYPELIB.new(type_lib, name) if type_lib
end
end
typelibs
end
|
Instance Method Details
#guid ⇒ Object
22
23
24
|
# File 'lib/win32ole/win32ole_typelib.rb', line 22
def guid
@typelib.guid
end
|
#inspect ⇒ Object
52
53
54
|
# File 'lib/win32ole/win32ole_typelib.rb', line 52
def inspect
name
end
|
#major_version ⇒ Object
30
31
32
|
# File 'lib/win32ole/win32ole_typelib.rb', line 30
def major_version
@typelib.major_version
end
|
#minor_version ⇒ Object
26
27
28
|
# File 'lib/win32ole/win32ole_typelib.rb', line 26
def minor_version
@typelib.minor_version
end
|
#ole_classes ⇒ Object
MRI: ole_types_from_typelib
34
35
36
37
38
39
40
|
# File 'lib/win32ole/win32ole_typelib.rb', line 34
def ole_classes ole_classes = []
find_all_typeinfo(@typelib) do |info, docs|
ole_classes << WIN32OLE_TYPE.new(self, info, docs)
end
ole_classes
end
|
#version ⇒ Object
42
43
44
|
# File 'lib/win32ole/win32ole_typelib.rb', line 42
def version
[minor_version, major_version].join('.')
end
|
#visible? ⇒ Boolean
46
47
48
49
50
|
# File 'lib/win32ole/win32ole_typelib.rb', line 46
def visible?
flags = @typelib.flags
flags != 0 && (flags & TypeLib::LIBFLAG_FRESTRICTED) == 0 &&
(flags & TypeLib::LIBFLAG_FHIDDEN) == 0
end
|