#565 Incorectly treats certain COM properties as functions

Tasks (408)
Andy Nguyen

The solution task Incorectly treats certain COM
properties as functions. NAnt 0.85 RC4.

My solution has a project that references an OCX. The
property displayed in Object Browser like this:

public virtual new short Threshold [ get, set ]
Member of AxOMRCtrl.AxOMRCtrl

Building the solution inside Visual Studio 2003 or from
CruiseControl.NET works just fine. When using NAnt, I
got this error:

[solution] src\.....BatchUC.cs(1289,29): error CS0654:
Method 'AxOMRCtrl.AxOMRCtrl.Threshold(short)'
referenced without parentheses
[solution] src\.....BatchUC.cs(1291,17): error CS0654:
Method 'AxOMRCtrl.AxOMRCtrl.Threshold (short)'
referenced without parentheses
[solution] Build failed.

Threshold is defined under the method section of
dispinterface as:

[propget, id(18), helpstring("property Threshold")]
HRESULT Threshold([out, retval] short *pVal);
[propput, id(18), helpstring("property Threshold")]
HRESULT Threshold([in] short newVal);

The other properties that did not produce error are
defined under the properties section of disinterface
and are similar to this:

[id(8)] boolean Open;

I'm using , and have tried with both .NET 1.1 and 2.0
Framework. I have also tried running NAnt from the
Visual Studio .NET 2003 Command Prompt.


  • Gert Driesen

    Gert Driesen - 2006-07-23
    • assigned_to: nobody --> drieseng
    • status: open --> closed-fixed
  • Gert Driesen

    Gert Driesen - 2006-07-23

    Logged In: YES

    We were NOT using the dispret transform when importing the
    type library, and as a result [out, retval] parameters of
    methods on dispatch-only interfaces (dispinterfaces) were
    not transformed into return values.

    As part of the fix, I've added a "transform" attribute to
    <tlbimp> which is ignored when targeting .NET Framework
    1.0 (as dispret is only implemented in .NET 1.1 and

    I'll upload a new nightly build in a few hours, and let
    you know (by email) when it's available.

    Thanks for the report!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks