> > I think I recall that in COM+ it is possible to hand over
> > one init string to the ctor of a component - I'm not sure.
>
>
> It's quite possible. I don't recall it, but it's been a while since I've
> looked at COM+.
>

I've taken the time and retrieved the following information from
"COM+ Programming, Tapadiya, HP Prof. Books"

1. Its a feature of the new COM+ Catalog (which supersedes somehow the dated
registry)
2. Its intended to initialize components with "administrative values" like
e.g. database connection
3. The initialization string is stored in the COM+ Catalog, thus it is NOT
provided by the client
   ( at least not directly)
4. The string can be edited via the "Component Services Snap-in"
5. It is only possible to configure one, and only one string
6. A component that wishes to receive an initalization string must implement
a
specific interface:

IObjectConstruct : IUnknown
{
HRESULT Construct([in] IDispatch *pCtorObj);
};

pCtorObj is bound at initialization time by the COM runtime to an object
which implements ..

IObjectConstructString : IDispatch
{
 [propget] HRESULT ConstructString([retval][out] BSTR *pVal);
};

Quite straightforward.

>
> >>.. and IMO its not a good idea.
> >>
> >>
> >
> > I very much like the "feeling" these URL + ?params style
> > ContractIDs give me at the scripting language level.
>
> It does give a more constructor feel to instantiation. I guess my
> initial aversion was because of the overhead of parsing the string for
> the parameters and the associated error logic if the parameter type was
> incorrect.
>






Reply via email to