>I am trying to use an ActiveX control which, exposes a function that modifies the arguments sent to it. The arguments sent to the function are of type VARIANT not references to VARIANT. I attempted to send references but FoxPro returned an OLE error of type mismatch. Consequently, the ActiveX control's function can't modify the arguments passed to it (i.e. the parameters are being passed by value not reference). How does one pass parameters to an ActiveX control and have those parameters return with the modified values?
>
The right (IOW, MS-approved) way to do this is to use exposed properties, and let the control act on the properties rather than arguments to the method. This is to avoid exactly the situation you've encountered - different languages represent data in different ways, and much of the value of the OLE interface is to provide a common mechanism for data conversion. AFAIK, there's no simple way to provide this functionality without creating a wrapper on the the control in another language that handles the conversion tasks and understands both VFP's and the controls native data representations.