tags:

views:

60

answers:

1

How would you implement this property in IDL:

    public int[] Params
    {
        get
        {
            return _Params;
        }
        set
        {
            _Params = value;
        }
    }

I tried the idl code below

[propget, helpstring("The click through parameters")] 
    HRESULT Params([out, retval] int *rVal);
[propput, helpstring("The click through parameters")] 
    HRESULT Params([in] int *RnewVal);

But my compiler is looking for this

public int get_Params()
{
    throw new NotImplementedException();
}

public void set_Params(ref int rVal)
{
    throw new NotImplementedException();
}

I'm 99.999% sure it's a problem with the types.

+2  A: 

COM typelib importer prefers to deal with Automation-compliant interfaces, so use SAFEARRAY:

[propget, helpstring("The click through parameters")] 
HRESULT Params([out, retval] SAFEARRAY(long) *rVal);

[propput, helpstring("The click through parameters")] 
HRESULT Params([in] SAFEARRAY(long) RnewVal);
Pavel Minaev
That did it! Thanks
Ziplin