What to do with type library when aggregating ACTIVEX Control? 
Author Message
 What to do with type library when aggregating ACTIVEX Control?

Hi,
I need to Aggregate an ACTIVEX control,Add new Event
and allow type library browsing for the newly created ACTIVEX control

How do i do it?

Thanks in advance

Tomer Dror



Mon, 24 May 2004 16:39:55 GMT  
 What to do with type library when aggregating ACTIVEX Control?
Essentialy, you need to build a new type library for your control, which is
a copy of original control's type library with appropriate modifications.
Importlib original TLB into your IDL, and specify a coclass that uses
imported incoming interface but your own source interface.

Now implementation. If the original control supports aggregation, you can
blind-aggregate all its interfaces exept IConnectionPointContainer,
IProvideClassInfo(2) (if you are implementing it), IDispatch and whatever
dual interface your controls implement, if any.

IProvideClassInfo(2) implementation should provide your new type info. The
same for IDispatch::GetTypeInfoCount and IDispatch::GetTypeInfo - you can
forward all the rest of the methods to the original control.

You should implement IConnectionPointContainer yourself to support extended
event set. You need to sink events from original control and refire them as
your own, plus any additional events you want.

If original ActiveX control does not support aggregation, then you can
create a composite control that hosts the original control. Again, you sink
events from original control and refire them as your own. You also forward
all calls on your primary automation interface.
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat, and
wrong." H.L. Mencken


Quote:
> Hi,
> I need to Aggregate an ACTIVEX control,Add new Event
> and allow type library browsing for the newly created ACTIVEX control

> How do i do it?

> Thanks in advance

> Tomer Dror



Mon, 24 May 2004 07:00:33 GMT  
 What to do with type library when aggregating ACTIVEX Control?
You also must intercept and implement yourself any/all persistence
interfaces of the original control (IPersist and any interfaces derived
from it like IPersistStreamInit or IPersistPropertyBag).

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> Essentialy, you need to build a new type library for your control, which
is
> a copy of original control's type library with appropriate modifications.
> Importlib original TLB into your IDL, and specify a coclass that uses
> imported incoming interface but your own source interface.

> Now implementation. If the original control supports aggregation, you can
> blind-aggregate all its interfaces exept IConnectionPointContainer,
> IProvideClassInfo(2) (if you are implementing it), IDispatch and whatever
> dual interface your controls implement, if any.

> IProvideClassInfo(2) implementation should provide your new type info. The
> same for IDispatch::GetTypeInfoCount and IDispatch::GetTypeInfo - you can
> forward all the rest of the methods to the original control.

> You should implement IConnectionPointContainer yourself to support
extended
> event set. You need to sink events from original control and refire them
as
> your own, plus any additional events you want.

> If original ActiveX control does not support aggregation, then you can
> create a composite control that hosts the original control. Again, you
sink
> events from original control and refire them as your own. You also forward
> all calls on your primary automation interface.
> --
> With best wishes,
>     Igor Tandetnik

> "For every complex problem, there is a solution that is simple, neat, and
> wrong." H.L. Mencken



> > Hi,
> > I need to Aggregate an ACTIVEX control,Add new Event
> > and allow type library browsing for the newly created ACTIVEX control

> > How do i do it?

> > Thanks in advance

> > Tomer Dror



Mon, 24 May 2004 08:35:15 GMT  
 What to do with type library when aggregating ACTIVEX Control?


Fri, 19 Jun 1992 00:00:00 GMT  
 What to do with type library when aggregating ACTIVEX Control?
Thanks

Tomer Dror


Quote:
> You also must intercept and implement yourself any/all persistence
> interfaces of the original control (IPersist and any interfaces derived
> from it like IPersistStreamInit or IPersistPropertyBag).

> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD

> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================



> > Essentialy, you need to build a new type library for your control, which
> is
> > a copy of original control's type library with appropriate
modifications.
> > Importlib original TLB into your IDL, and specify a coclass that uses
> > imported incoming interface but your own source interface.

> > Now implementation. If the original control supports aggregation, you
can
> > blind-aggregate all its interfaces exept IConnectionPointContainer,
> > IProvideClassInfo(2) (if you are implementing it), IDispatch and
whatever
> > dual interface your controls implement, if any.

> > IProvideClassInfo(2) implementation should provide your new type info.
The
> > same for IDispatch::GetTypeInfoCount and IDispatch::GetTypeInfo - you
can
> > forward all the rest of the methods to the original control.

> > You should implement IConnectionPointContainer yourself to support
> extended
> > event set. You need to sink events from original control and refire them
> as
> > your own, plus any additional events you want.

> > If original ActiveX control does not support aggregation, then you can
> > create a composite control that hosts the original control. Again, you
> sink
> > events from original control and refire them as your own. You also
forward
> > all calls on your primary automation interface.
> > --
> > With best wishes,
> >     Igor Tandetnik

> > "For every complex problem, there is a solution that is simple, neat,
and
> > wrong." H.L. Mencken



> > > Hi,
> > > I need to Aggregate an ACTIVEX control,Add new Event
> > > and allow type library browsing for the newly created ACTIVEX control

> > > How do i do it?

> > > Thanks in advance

> > > Tomer Dror



Tue, 25 May 2004 03:57:28 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Aggregating an ATL ActiveX control ???

2. need help with aggregating an ActiveX control

3. need help with aggregating an ActiveX control

4. Control webbrowser ActiveX control in composit ActiveX control

5. Aggregate types

6. Array-Like Aggregate Type with negative Indices???

7. Small Project: VC aggregates a VB ActiveX Dll $$$

8. Problems aggregating 2 OCX/ActiveX components

9. ActiveX control registered as a MIME type viewer

10. problem with available data types in ActiveX controls

11. ActiveX control type

12. Type mismatch calling custom ActiveX control method

 

 
Powered by phpBB® Forum Software