Re: Add, Remove, Clear method of collection
- From: Johnson Lau <laozhongcheng@xxxxxxxxxxx>
- Date: Thu, 14 Aug 2008 00:30:43 +0800
Brian Muth wrote:
Which interface are you talking about?
Sorry for less information.
I'm talking about the ATL collection/enumeration implementations.
For example, I have an interface names ILinks.
interface ILinks : IDispatch{
[id(1), helpstring("method Add")] HRESULT Add([in] IDispatch* item);
[id(2), helpstring("method Remove")] HRESULT Remove([in] long pos);
[propget, id(3), helpstring("property Count")] HRESULT Count([out, retval] LONG* pVal);
[propget, id(DISPID_VALUE), helpstring("property Item")] HRESULT Item([in] LONG pos, [out, retval] VARIANT* pVal);
[propget, restricted, id(DISPID_NEWENUM), helpstring("property _NewEnum")] HRESULT _NewEnum([out, retval] IUnknown** ppunk);
};
I realize that the Count, Item and _NewEnum must be exactly as above
to make it act as a collection and enumeration, and compatible
with automation which enables interoperations with VB and script.
But I can find anything detail about the Add and Remove method.
Does it mean that I can have arbitrary definitions of Add and/or Remove as which I have done above?
Or it must be in some kind of fixed forms I cannot violate just like the Count, Item and _NewEnum?
Johnson Lau
.
- Follow-Ups:
- Re: Add, Remove, Clear method of collection
- From: Brian Muth
- Re: Add, Remove, Clear method of collection
- References:
- Add, Remove, Clear method of collection
- From: Johnson Lau
- Re: Add, Remove, Clear method of collection
- From: Brian Muth
- Add, Remove, Clear method of collection
- Prev by Date: Re: Add, Remove, Clear method of collection
- Next by Date: Re: Add, Remove, Clear method of collection
- Previous by thread: Re: Add, Remove, Clear method of collection
- Next by thread: Re: Add, Remove, Clear method of collection
- Index(es):
Relevant Pages
|