From: Masaki Suketa Date: 2009-09-12T06:57:47+09:00 Subject: Re: Ruby + COM + OLEGEN Hello, At 09/11/2009 11:11 PM, Bruno Antunes wrote: >> Do you know how to instantiate object from these classes in VBScript? >> For example, in VBScript: >> Set acdEvent = CreateObject("ABC.XYZ") >> then in Win32OLE: >> acdEvent = WIN32OLE.new("ABC.XYZ") >> >> Regards, >> Masaki Suketa > > The problem is not creating the CCS application object - it's the only > class that I can from OLEGEN's output. However, AcdEvent should also be > a class and I can't instantiate any objects of that type, since OLEGEN's > output only gives me a module :| What is the result of the following code? require 'win32ole' WIN32OLE_TYPE.ole_classes("Ccs.tlb").each do |k| puts k.name puts k.ole_type puts k.guid puts k.progid puts "---" end If k.progid or k.guid is nil, then OLEGEN outputs a module. Because Win32OLE does not know how to instantiate a Class without guid and progid. Anyway, if you could instantiate AcdEvent object in VBScript, then you could instantiate AcdEvent object in Win32OLE. If you could not instantiate it in VBScript, then you could not instantiate it in Win32OLE. And OLEGEN's output depends on Win32OLE, so OLEGEN's output is same. You should ask the provider of CCS how to instantiate AcdEvent in VBScript. Regards, Masaki Suketa