making a read-only property read-write in extended interface
Hello,
First post to this group. Hope someone can answer this or at least
confirm that it can't be done.
Here goes:
I have at type library with a bunch of interfaces that is used mainly
in VB6 and .NET (nothing exciting here). In my quest for immutability I
made a property read-only, but in the new version of the library it
needs to be read-write. So I have a derived interface, say IFoo2, where
I added a propput method for the property. This idl however does not
compile:
interface IFoo : IDispatch{
[propget, id(1)] HRESULT Bar([out,retval] BSTR* pVal);
}
interfce IFoo2 : IFoo {
[propput, id(1)] HRESULT Bar([in] BSTR newVal);
}
If I change the propput id it compiles alright, but the property is
still read-only in VB. I tried adding a propget and proput in the new
interface with the same id (in an attempt to override the original
property), but to no avail.
So the question is: can it be done,and if yes, how?
The library is implementd in C++ using Visual Studio .NET 2003.
TIA
date: 27 Jan 2006 22:59:42 -0800
author: nick