Masaki Suketa wrote:
> BTW, Does the following VBScript work?
>   Set obj = CreateObject("QPTnt.ocx")
>   obj.Version
> or
>   Set obj = CreateObject("QPTNT.QPTntCtrl.1")
>   obj.Version
> 
> If it would not work, Win32OLE script does not work.

You're leading me toward the problem.  That VBScript code does not work. 
It actually gives the same error statement that win32ole gives!

I went back and tried to re-create my VBScript code.  I remembered I 
used "ActiveX Control Pad" to test the VBScript method last year.

This is code (embeded in and html doc and mostly generated by ActiveX 
control pad) that works with my ocx.

<HTML><HEAD><TITLE>OCX test</TITLE>
<SCRIPT LANGUAGE="VBScript">
  Sub window_onLoad()
    document.frmEx.out1.value=QPTnt1.Version
  End Sub
</SCRIPT>
</HEAD><BODY>

<OBJECT ID="QPTnt1" WIDTH=16 HEIGHT=16 
CLASSID="CLSID:884BD6BB-E4BA-4EEA-A632-D7A92541602F">
  <PARAM NAME="_Version" VALUE="65536">
  <PARAM NAME="_ExtentX" VALUE="423">
  <PARAM NAME="_ExtentY" VALUE="423">
  <PARAM NAME="_StockProps" VALUE="0">
</OBJECT>

<FORM NAME="frmEx">
        <INPUT TYPE=Text SIZE=10 NAME="out1">
</FORM>
</BODY></HTML>

It works and returns the version of the OCX as specified by the Version 
method.

Is there an equivalent Ruby syntax that might work?

Does this provide a clue why my ocx won't work with the win32ole?

Thanks

-- 
Posted via http://www.ruby-forum.com/.