Class: WIN32OLE_TYPELIB
Relationships & Source Files | |
Inherits: | Object |
Defined in: | ext/win32ole/win32ole_typelib.c, ext/win32ole/win32ole_typelib.c |
Overview
WIN32OLE_TYPELIB
objects represent OLE tyblib information.
Class Method Summary
-
.new(typelib [, version1, version2]) ⇒ WIN32OLE_TYPELIB
constructor
Returns a new
WIN32OLE_TYPELIB
object. -
.typelibs
Returns the array of
WIN32OLE_TYPELIB
object.
Instance Attribute Summary
-
#visible? ⇒ Boolean
readonly
Returns true if the type library information is not hidden.
Instance Method Summary
-
#guid ⇒ The guid string.
Returns guid string which specifies type library.
-
#inspect ⇒ String
Returns the type library name with class name.
-
#library_name
Returns library name.
-
#major_version ⇒ The type library major version.
Returns the type library major version.
-
#minor_version ⇒ The type library minor version.
Returns the type library minor version.
-
#name ⇒ The type library name
Alias for #to_s.
-
#ole_classes ⇒ The array of WIN32OLE_TYPE object included the type library.
Alias for #ole_types.
-
#ole_types ⇒ The array of WIN32OLE_TYPE object included the type library.
(also: #ole_classes)
Returns the type library file path.
-
#path ⇒ The type library file path.
Returns the type library file path.
-
#to_s ⇒ The type library name
(also: #name)
Returns the type library name.
-
#version ⇒ The type library version String object.
Returns the type library version.
Constructor Details
.new(typelib [, version1, version2]) ⇒ WIN32OLE_TYPELIB
Returns a new WIN32OLE_TYPELIB
object.
The first argument typelib specifies OLE type library name or GUID or OLE library file. The second argument is major version or version of the type library. The third argument is minor version. The second argument and third argument are optional. If the first argument is type library name, then the second and third argument are ignored.
tlib1 = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
tlib2 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}')
tlib3 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}', 1.3)
tlib4 = WIN32OLE_TYPELIB.new('{00020813-0000-0000-C000-000000000046}', 1, 3)
tlib5 = WIN32OLE_TYPELIB.new("C:\\WINNT\\SYSTEM32\\SHELL32.DLL")
puts tlib1.name # -> 'Microsoft Excel 9.0 Object Library'
puts tlib2.name # -> 'Microsoft Excel 9.0 Object Library'
puts tlib3.name # -> 'Microsoft Excel 9.0 Object Library'
puts tlib4.name # -> 'Microsoft Excel 9.0 Object Library'
puts tlib5.name # -> 'Microsoft Shell Controls And Automation'
Class Method Details
.typelibs
Returns the array of WIN32OLE_TYPELIB
object.
tlibs = WIN32OLE_TYPELIB.typelibs
Instance Attribute Details
#visible? ⇒ Boolean
(readonly)
Returns true if the type library information is not hidden. If wLibFlags of TLIBATTR is 0 or LIBFLAG_FRESTRICTED or LIBFLAG_FHIDDEN, the method returns false, otherwise, returns true. If the method fails to access the TLIBATTR information, then ::WIN32OLERuntimeError is raised.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
tlib.visible? # => true
Instance Method Details
#guid ⇒ The
guid string
.
Returns guid string which specifies type library.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
guid = tlib.guid # -> '{00020813-0000-0000-C000-000000000046}'
#inspect ⇒ String
Returns the type library name with class name.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
tlib.inspect # => "<#WIN32OLE_TYPELIB:Microsoft Excel 9.0 Object Library>"
#library_name
Returns library name. If the method fails to access library name, ::WIN32OLERuntimeError is raised.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
tlib.library_name # => Excel
#major_version ⇒ The
type
library
major
version.
Returns the type library major version.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
puts tlib.major_version # -> 1
#minor_version ⇒ The
type
library
minor
version.
Returns the type library minor version.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
puts tlib.minor_version # -> 3
#to_s ⇒ The
type
library
name
#name ⇒ The
type
library
name
The
type
library
name
#name ⇒ The
type
library
name
Alias for #to_s.
#ole_types ⇒ The
array
of
WIN32OLE_TYPE object
included
the
type
library
.
#ole_classes ⇒ The
array
of
WIN32OLE_TYPE object
included
the
type
library
.
The
array
of
WIN32OLE_TYPE object
included
the
type
library
.
#ole_classes ⇒ The
array
of
WIN32OLE_TYPE object
included
the
type
library
.
Alias for #ole_types.
#ole_types ⇒ The
array
of
WIN32OLE_TYPE object
included
the
type
library
. Also known as: #ole_classes
#path ⇒ The
type
library
file
path.
Returns the type library file path.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
puts tlib.path #-> 'C:\...\EXCEL9.OLB'
#to_s ⇒ The
type
library
name Also known as: #name
#version ⇒ The
type
library
version String
object
.
Returns the type library version.
tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
puts tlib.version #-> "1.3"