Skip to main content

Access ocx with Groovy/Scriptom - mapping DISPID

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2013-03-19

Hello all.
I'm getting an error (bellow) when trying to access the methods of a ocx of third party, with Scriptom (Groovy). I checked that there are already folders, in the Scriptom structure, containing DISPIDs of some Windows applications, such as SAPI (site's example ) and .txt files in typelib folder, where the .ocx/.olb addresses of files these applications are described.If the Scriptom uses these files (.txts + content of org\codehaus\groovy\scriptom\tlb) as base to talk with the COM object, my question is, How I do to generate a structure as this to a ocx of third party ? If not are this the files used for Scriptom: How It identifies the methods and variables of the ocx file? How can I simulate it?
I observed that there is a script called extractTblInfo.groovy that, from what I understand, create these interfaces (classes containing the DISPID in the /tlb folder). I tried to run it, but I have strange errors (bellow). I feel lost here (... lol ...). I'd appreciate if someone could help me.

Exception - ocx call method:

Caught: Can't map names to dispid:setLicenseKey Can't map names to dispid:setLicenseKey

Code - Chamada método ocx:
ActiveXObject myObj = new ActiveXObject('VAXSIPUSERAGENTOCX.VaxSIPUserAgentOCXCtrl.1');
myObj.setLicenseKey("string license key");//Here error occurs

or this way:
String key = new String("string license key");
myObj.invokeMethod("setLicenseKey", key);

Erro ExtractTblInfo:

Caught: Assertion failed:

assert args.size() > 0
| | |
[] 0 false

Thanks in advance,