Ruby + COM + OLEGEN

B

Bruno Antunes

Hello.

I have this TLB, and when I run OLEGEN
(\doc\ruby\ruby-1.8.6\sample\win32ole) I obtain a file that is either
incomplete or I'm missing something. It only generates only one class
and 5 modules. If so, how can I run, for example, AcdEvent's Connect()
method since there's no class to instantiate AcdEvent objects? When I
import the same TLB into VisualStudio, I get a DLL with 3 instantiable
classes (AcdAutomationServer, AcdEvent and AcdObject). Is this a
limitation of OLEGEN?

I have attached to this issue the TLB file in question, if anyone can
tell me how to do this, I would be very, very, very thankful! :D

Thanks for your time!

Attachments:
http://www.ruby-forum.com/attachment/4028/Ccs.tlb
 
B

Bruno Antunes

Bruno said:
Hello.

I have this TLB, and when I run OLEGEN
(\doc\ruby\ruby-1.8.6\sample\win32ole) I obtain a file that is either
incomplete or I'm missing something. It only generates only one class
and 5 modules. If so, how can I run, for example, AcdEvent's Connect()
method since there's no class to instantiate AcdEvent objects? When I
import the same TLB into VisualStudio, I get a DLL with 3 instantiable
classes (AcdAutomationServer, AcdEvent and AcdObject). Is this a
limitation of OLEGEN?

I have attached to this issue the TLB file in question, if anyone can
tell me how to do this, I would be very, very, very thankful! :D

Thanks for your time!

(one thing: posting here since my post to the Google group didn't went
through...)
 
M

Masaki Suketa

Hello,


OLEGEN is for early binding and not tested well.
Direct Instantiating object from class made by OLEGEN
is not stable.

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
 
B

Bruno Antunes

Masaki said:
Hello,



OLEGEN is for early binding and not tested well.
Direct Instantiating object from class made by OLEGEN
is not stable.

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 :|

Regards,
Bruno Antunes
 
M

Masaki Suketa

Hello,

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top