So I found the solution, hope my code helps someone else.

----- C# CODE -----

  public int Retrieve(int Count, 
            ref DateTime[] Date,
            ref float[] Open,
            ref float[] High,
            ref float[] Low,
            ref float[] Close,
            ref int[] Volume,
            ref int[] OpenInt)
        {
            object[] ParamArray = new object[8];
            ParamArray[0] = (long)Count;
            ParamArray[1] = new VariantWrapper(Date);
            ParamArray[2] = new VariantWrapper(Open);
            ParamArray[3] = new VariantWrapper(High);
            ParamArray[4] = new VariantWrapper(Low);
            ParamArray[5] = new VariantWrapper(Close);
            ParamArray[6] = new VariantWrapper(Volume);
            ParamArray[7] = new VariantWrapper(OpenInt);

            //throw new NotImplementedException();
            ParameterModifier p = new ParameterModifier(8);

            // Pass the first and third parameters by reference.
            p[0] = false;
            p[1] = true;
            p[2] = true;
            p[3] = true;
            p[4] = true;
            p[5] = true;
            p[6] = true;
            p[7] = true;
            ParameterModifier[] mods = { p };

            int cnt = (int)ComParent.GetType().InvokeMember("Retrieve", 
BindingFlags.Default | BindingFlags.InvokeMethod,
                        null,
                        ComParent,
                        ParamArray, mods, null, null);

            Date = (DateTime[])ParamArray[1];
            Open = (float[])ParamArray[2];
            High = (float[])ParamArray[3];
            Low = (float[])ParamArray[4];
            Close = (float[])ParamArray[5];
            Volume = (int[])ParamArray[6];
            OpenInt = (int[])ParamArray[7];

            return cnt;
        }

------ END CODE ----

--- In [email protected], "angeld_1985" <ang...@...> wrote:
>
> I'm trying to write Amibroker COM wrapper in .net, and i stuck in 
> implementation of Quotations.Retrieve method. 
> 


Reply via email to