E
Edward Diener
In the Writing Components topic of Mr. Grimes' book on Managed C++, he
states that if a component is ultimately derived from either
MarshalByRefObject or MarshalByValueComponent, it should implement a second
constructor which takes an IContainer in order to add itself to a component
container. While I understand that components have containers, I have seen
no documentation regarding a second constructor to a component. Does it
really exist or is this an error in Mr. Grimes' nearly flawless technical
writing. If this second constructor actually exists:
1) What container(s) creates a component calling this second constructor ?
2) Why does MarshalByRefObject or MarshalByValueComponent not have this
second constructor which would automatically add itself to an IContainer
derived object when a derived class calls down to one of these bases in its
constructor ?
3) Where in the MSDN documentation is this second constructor documented ?
states that if a component is ultimately derived from either
MarshalByRefObject or MarshalByValueComponent, it should implement a second
constructor which takes an IContainer in order to add itself to a component
container. While I understand that components have containers, I have seen
no documentation regarding a second constructor to a component. Does it
really exist or is this an error in Mr. Grimes' nearly flawless technical
writing. If this second constructor actually exists:
1) What container(s) creates a component calling this second constructor ?
2) Why does MarshalByRefObject or MarshalByValueComponent not have this
second constructor which would automatically add itself to an IContainer
derived object when a derived class calls down to one of these bases in its
constructor ?
3) Where in the MSDN documentation is this second constructor documented ?