How to pass a ParamArray Of Variant to an ActiveX method

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

How to pass a ParamArray Of Variant to an ActiveX method

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:42 pm

by josepho >> Mon, 24 Mar 2003 8:01:13 GMT

Hello,

I have imported an ActiveX control into JADE which provides the ability to access a PICK database. I am able to successfully connect to the datasource and retrieve/update records. The activeX control also provides the ability to execute subroutines in the PICK environment. The method that is used to enable this has the following signature when imported into Visual Basic.

brCall(ParamArray vArgs() As Variant) As Boolean

In Jade it is defined as

brCall(vArgs Any io) : Boolean

However no matter what type I use to pass the parameters I keep getting a type mismatch error. I am invoking a subroutine in the PICK environment which has four parameters the first three are used for input and are concatenated together to be returned in last parameter.

I have read documentation that indicates that a param array is defined as a series of 1-byte variants with a null as a delimiter and terminated by two nulls. So I have tried using a binary and defined the contents as follows

'A'.Binary & '#00'.Binary & 'A'.Binary & '#00'.Binary & 'A'.Binary & '#00'.Binary & ' '.Binary & '#00'.Binary & '#00'.Binary

However this does not work so if you have had any experience with calling methods that defined a ParamArray of variant can you please let me know how I can call this method from JADE.

Thanks In Advance

Joseph

Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 13 guests