tags:

views:

65

answers:

1

Hi

I am trying to design a COM library that uses a property to return a record. The Delphi COM Wizard allows me to create the property, but when it is compiled, I get

[GENTLB Error] Project1.ridl(1): Error saving C:\Users\mark\Documents\RAD Studio\Projects\Test\Project1.tlb: Inconsistent property functions

The RIDL file that is generated looks like this ...

[
 uuid(24BD89DB-AB22-430C-874C-EC5CEA062E80)
]   
struct Record1   
{
    long Field1;   
};


[
  uuid(FA48C31A-56B8-4A86-8325-5A2000AA77B2),
  helpstring("Interface for XXX Object"),
  oleautomation
]
interface IXXX : IUnknown
{
  [propget, id(0x00000065)]
  HRESULT _stdcall Property1([out, retval] struct Record1* Value);
  [propput, id(0x00000065)]
  struct Record1 _stdcall Property1([in] long Value);
};

Can anyone see what I am doing wrong here?

Thanks

+1  A: 

The "propput" part should look like this:

[propput, id(0x00000065)]
HRESULT _stdcall Property1([in] struct Record1 Value);
TOndrej
Thanks, and it does fix the issue, the only problem is that I didn't create the RIDL like that in the first place, the COM Wizard did. I'll try and repeat it, and see what is going wrong.
Mmarquee
Report the bug to QC.
Remy Lebeau - TeamB