Calling COM method with signature [VT_BSTR, VT_BYREF|VT_I2] fails
-----------------------------------------------------------------

                 Key: JRUBY-5404
                 URL: http://jira.codehaus.org/browse/JRUBY-5404
             Project: JRuby
          Issue Type: Bug
          Components: win32ole
    Affects Versions: JRuby 1.6RC1
         Environment: jruby 1.6.0.RC1 (ruby 1.8.7 patchlevel 330) (2011-01-10 
769f847) (Java HotSpot(TM) Client VM 1.6.0_23) [Windows XP-x86-java]
jruby-win32ole 0.8.3
WinXP SP3
            Reporter: Colby Hart
            Assignee: Thomas E Enebo
            Priority: Minor


Calling the following works with ruby 1.8.6 [i386-mswin32], but fails with 
JRuby.  I tried it on a few systems with the same configuration.  

  # VOID LoadObjects
  #   BSTR arg0 --- Configuration []
  #   I2 arg1 --- errCode []
  def LoadObjects(arg0, arg1=0)
    ret = _invoke(1, [arg0, arg1], [VT_BSTR, VT_BYREF|VT_I2])
    @lastargs = WIN32OLE::ARGV
    ret
  end

The exception is:

Java::OrgRacobCom::ComFailException: A COM exception has been encountered:
At Invoke of: 1
Description: Type mismatch.

        from org.racob.com.Dispatch.invokev(Native Method)
        from org.racob.com.Dispatch.invokev(Dispatch.java:247)
        from org.racob.com.Dispatch.invoke(Dispatch.java:204)
        from 
org.jruby.ext.win32ole.RubyWIN32OLE.invokeInternal(RubyWIN32OLE.java:165)
        from org.jruby.ext.win32ole.RubyWIN32OLE._invoke(RubyWIN32OLE.java:102)
        from 
org.jruby.ext.win32ole.RubyWIN32OLE$i_method_3_0$RUBYINVOKER$_invoke.call(org/jruby/ext/win32ole/RubyWIN32OLE$i_method_3_0$RUBYINVOKER$_invoke.gen:65535)
        from 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:322)
        from 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:207)
        from 
org.jruby.ast.FCallThreeArgNode.interpret(FCallThreeArgNode.java:40)
        from org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
        from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:103)
        from org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        from 
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:70)
        from 
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:184)
        from 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:179)
        from 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:282)
... 150 levels...
        from org.jruby.ast.BeginNode.interpret(BeginNode.java:83)
        from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:103)
        from org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        from 
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:70)
        from 
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:184)
        from 
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:179)
        from 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:282)
        from 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:139)
        from 
C_3a_.rubys.jruby_minus_1_dot_6_dot_0_dot_RC1.bin.jirb.__file__(C:\rubys\jruby-1.6.0.RC1\bin\jirb:13)
        from 
C_3a_.rubys.jruby_minus_1_dot_6_dot_0_dot_RC1.bin.jirb.load(C:\rubys\jruby-1.6.0.RC1\bin\jirb)
        from org.jruby.Ruby.runScript(Ruby.java:702)
        from org.jruby.Ruby.runNormally(Ruby.java:587)
        from org.jruby.Ruby.runFromMain(Ruby.java:421)
        from org.jruby.Main.run(Main.java:304)
        from org.jruby.Main.run(Main.java:144)
        from org.jruby.Main.main(Main.java:113)


I would be happy to provide any further information that you think would be 
helpful.




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to