Class: TurboRex::Windows::COM::COMRegistry::CLSIDEntry
- Inherits:
-
Object
- Object
- TurboRex::Windows::COM::COMRegistry::CLSIDEntry
- Defined in:
- lib/turborex/windows/com/com_registry.rb
Defined Under Namespace
Classes: InprocHandler, InprocHandler32, InprocServer, InprocServer32, LocalServer, LocalServer32
Instance Attribute Summary collapse
-
#clsid ⇒ Object
readonly
Returns the value of attribute clsid.
-
#inproc_handler ⇒ Object
Returns the value of attribute inproc_handler.
-
#inproc_handler32 ⇒ Object
Returns the value of attribute inproc_handler32.
-
#inproc_server ⇒ Object
Returns the value of attribute inproc_server.
-
#inproc_server32 ⇒ Object
Returns the value of attribute inproc_server32.
-
#local_server ⇒ Object
Returns the value of attribute local_server.
-
#local_server32 ⇒ Object
Returns the value of attribute local_server32.
-
#prog_id ⇒ Object
Returns the value of attribute prog_id.
-
#treat_as ⇒ Object
Returns the value of attribute treat_as.
-
#typelib ⇒ Object
Returns the value of attribute typelib.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(clsid) ⇒ CLSIDEntry
constructor
A new instance of CLSIDEntry.
Constructor Details
#initialize(clsid) ⇒ CLSIDEntry
Returns a new instance of CLSIDEntry.
27 28 29 |
# File 'lib/turborex/windows/com/com_registry.rb', line 27 def initialize(clsid) @clsid = clsid end |
Instance Attribute Details
#clsid ⇒ Object (readonly)
Returns the value of attribute clsid.
9 10 11 |
# File 'lib/turborex/windows/com/com_registry.rb', line 9 def clsid @clsid end |
#inproc_handler ⇒ Object
Returns the value of attribute inproc_handler.
12 13 14 |
# File 'lib/turborex/windows/com/com_registry.rb', line 12 def inproc_handler @inproc_handler end |
#inproc_handler32 ⇒ Object
Returns the value of attribute inproc_handler32.
13 14 15 |
# File 'lib/turborex/windows/com/com_registry.rb', line 13 def inproc_handler32 @inproc_handler32 end |
#inproc_server ⇒ Object
Returns the value of attribute inproc_server.
10 11 12 |
# File 'lib/turborex/windows/com/com_registry.rb', line 10 def inproc_server @inproc_server end |
#inproc_server32 ⇒ Object
Returns the value of attribute inproc_server32.
11 12 13 |
# File 'lib/turborex/windows/com/com_registry.rb', line 11 def inproc_server32 @inproc_server32 end |
#local_server ⇒ Object
Returns the value of attribute local_server.
14 15 16 |
# File 'lib/turborex/windows/com/com_registry.rb', line 14 def local_server @local_server end |
#local_server32 ⇒ Object
Returns the value of attribute local_server32.
15 16 17 |
# File 'lib/turborex/windows/com/com_registry.rb', line 15 def local_server32 @local_server32 end |
#prog_id ⇒ Object
Returns the value of attribute prog_id.
16 17 18 |
# File 'lib/turborex/windows/com/com_registry.rb', line 16 def prog_id @prog_id end |
#treat_as ⇒ Object
Returns the value of attribute treat_as.
17 18 19 |
# File 'lib/turborex/windows/com/com_registry.rb', line 17 def treat_as @treat_as end |
#typelib ⇒ Object
Returns the value of attribute typelib.
18 19 20 |
# File 'lib/turborex/windows/com/com_registry.rb', line 18 def typelib @typelib end |
Class Method Details
.from_registry(reg_key) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/turborex/windows/com/com_registry.rb', line 31 def self.from_registry(reg_key) return unless reg_key.keyname =~ /^\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}$/i clsid_entry = new(reg_key.keyname.delete('{}')) reg_key.each_key do |k| reg_key.open(k) do |sub_key| case k.downcase when 'inprocserver32' clsid_entry.inproc_server32 = InprocServer32.new clsid_entry.inproc_server32.path = sub_key[''] rescue nil clsid_entry.inproc_server32.threading_model = (sub_key['ThreadingModel'] rescue 'sta') when 'localserver32' clsid_entry.local_server32 = LocalServer32.new clsid_entry.local_server32.path = sub_key[''] rescue nil clsid_entry.local_server32.server_executable = sub_key['ServerExecutable'] rescue nil when 'progid' @progid = sub_key[''] rescue nil when 'treatas' @treat_as = sub_key[''] rescue nil when 'typelib' @typelib = sub_key[''] rescue nil end end end clsid_entry end |