COM object

Trevor Makings

New Member
The "COM object Viewer" (in Protools) shows me I need to code the following progress syntax if I wish to run a specific method in my COM object:

NO-RETURN-VALUE <com-handle>: Calculate ( OUTPUT <anytype>-pUnknownValue BY-VARIANT-POINTER, OUTPUT Decimal-roundingAmount AS CURRENCY BY-POINTER, OUTPUT Date-roundingDate BY-POINTER ).

So in my program I code the following :
DEF VAR cfm AS COM-HANDLE.
DEF VAR roundingAmount AS dec.
DEF VAR roundingDate AS date.
DEF VAR punknownValue AS dec.

NO-RETURN-VALUE cfm:Calculate(
OUTPUT pUnknownValue BY-VARIANT-POINTER,
OUTPUT roundingAmount AS CURRENCY BY-POINTER,
OUTPUT roundingDate BY-POINTER ).

It compiles OK, but when I try to run it, I get a Progress Error : 5890
Error occurred while accessing component property/method: <property or method name>.
<COM message>
Error code: <Program name> (5890)

I guess the error has something to do with the variable punknownValue which I believe is defined as VARIANT in the COM object.
Does anyone have any ideas as to how I can resolve this?
 
Top