Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
platform
active.directory
adsi
adsi.iis-admin
base
com_ole
complus_mts
component_svcs
database
directx
gdi
graphics_mm
internet.client
internet.server
internet.server.isapi-dev
localization
mapi
messaging
msi
mslayerforunicode
multimedia
networking
networking.ipv6
sdk_install
security
shell
telephony.tapi_2
telephony.tapi_3
telephony.tsp
telephony.wte
tools
ui
ui_shell
win_base_svcs
win16
  
 
date: 27 Jan 2006 22:59:42 -0800,    group: microsoft.public.platformsdk.com_ole        back       


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

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us