Hello, this may not be the answer your question...,

In message "Re: Win32OLE trouble (custom ocx)"
    on 07/03/02, Barry Walker <barryjr / gmail.com> writes:

> > What is on line 6 of your script?
> 
> Line 6 is the method call on the object after the object is created.
> 
> I noticed one other thing when browsing the differences between the 
> class olegen created for my OCX and the class it created for excel.

Have you tried to access your OCX without using olegen?

If you have been able to access your OCX from VBScript, 
at first, try to access your OCX without using olegen 
and _invoke.

For example, if you can access the OCX in VBScript:

  Set obj = CreateObject("Your.OCX")
  obj.your_method(10)

then, you could access the OCX in Win32OLE like as the following.

  require 'win32ole'
  obj = WIN32OLE.new("Your.OCX")
  obj.your_method(10)

If this approach is fail, try to use olegen and _invoke like
as the following.

  require 'win32ole'
  include WIN32OLE::VARIANT
  obj = WIN32OLE.new("Your.OCX")

  # The second parameter is optional.
  obj._invoke(1, [10, nil], [VT_I2, VT_VARIANT]) 

And, I need more detail information to advise more effectively.
Could you show me the test.rb and the result of the following script?
(Before running script, please change "Your.OCX" and "your_method" 
to fit your OCX.)

  require 'win32ole'
  obj = WIN32OLE.new("Your.OCX")
  m = obj.ole_method_help("your_method")
  p m.dispid
  m.params.each do |param|
    puts "-----"
    p param.ole_type
    p param.ole_type_detail
    p param.optional?
  end


  Regards,
  Masaki Suketa