locked
How to use pparray of a VARIANT RRS feed

  • Question

  • I'm trying to asign a VARIANT als an reference int array. The VARIANT shall be asigned to a DISPPARAMS. And the DISPPARAMS will be put into a function from a tlb file as argument using Invoke.

    I've tried setting vt of the VARIANT als VT_BYREF|VT_ARRAY|VT_I4,  pparray equal to a SAFEARRAY**. But it failed. Does anyone know how to invoke a function with a reference array argument?

    Thursday, February 11, 2016 10:38 AM

All replies

  • why it has to be an reference int array ..why can't it be just an array on int
    Thursday, February 11, 2016 10:49 AM
  • because the array will be changed by the function
    Thursday, February 11, 2016 10:50 AM
  • On 2/11/2016 5:38 AM, ggwang wrote:

    I've tried setting vt of the VARIANT als VT_BYREF|VT_ARRAY|VT_I4,  pparray equal to a SAFEARRAY**. But it failed. Does anyone know how to invoke a function with a reference array argument?

    Define "it failed" - what outcome did you expect, and what did you observe? Show the IDL definition of the method you are trying to call, and your code that sets up parameters for the call.

    Thursday, February 11, 2016 2:53 PM