From: Derek Hamilton Date: 2001-07-26T08:09:43+09:00 Subject: [ruby-talk:18554] Re: Problems calling a VB COM object Just to be sure, check that your VB com component is accepting the parameters ByVal instead of the default ByRef. I believe this does give a type mismatch error and has to do with marshaling. HTH, Derek ----- Original Message ----- From: "Graham Brooks" Newsgroups: comp.lang.ruby To: "ruby-talk ML" ; Sent: Wednesday, July 25, 2001 3:19 PM Subject: [ruby-talk:18547] Problems calling a VB COM object > I am trying to script some COM tests using Ruby and WIN32OLE. I am new to > Ruby and so may be missing something obvious. > > The smallest script that advertises the error is > > require "win32ole" > o = WIN32OLE.new("ProgID") > rs = o.Method(51,2) > > The method in question takes two Long parameters and returns an ADODB > Recordset object. When I run the code I get a Type Mismatch error. Simailar > code in other scripts calling the same method work fine. Checking the ole > methods of the object indicates that the object supports the method I am > calling. > > Does anyone know why this should be going wrong? > > Thanks in advance > Graham > > > >