From: Graham Brooks Date: 2001-07-26T23:24:31+09:00 Subject: [ruby-talk:18568] Re: Problems calling a VB COM object Thanks for your suggestion. It worked a treat. Might be a problem in the future not being able to pass parameters by reference but at the moment it gets me out of a hole! Thanks again Graham "Derek Hamilton" wrote in message news:imI77.29810$YK4.2205960@e420r-atl1.usenetserver.com... > 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 > > > > > > > > > >