Accesses to a Com Dll and to a ActiveX Control Element 
Author Message
 Accesses to a Com Dll and to a ActiveX Control Element

Hi,

I'm working on a Dll for use in Visual Basic.
It's a Com Dll version of an equal ActiveX Control Element.

Now I'd like to know:
If I'm accessing them often in a short time, which version would be better?
The Com Dll or the ActiveX Control?

Thank you!



Sun, 28 Aug 2005 01:06:00 GMT  
 Accesses to a Com Dll and to a ActiveX Control Element
ActiveX is a COM dll with User Interface.
Sometimes developers are making regular COM objects as ActiveX just to have
it in Toolbox in VB rather  than add it to references.

There is no performance benefits. But ActiveX object should implement a lot
more mandatory interfaces ( to allow interactions with container) than
simple COM object.

George.


Quote:
> Hi,

> I'm working on a Dll for use in Visual Basic.
> It's a Com Dll version of an equal ActiveX Control Element.

> Now I'd like to know:
> If I'm accessing them often in a short time, which version would be
better?
> The Com Dll or the ActiveX Control?

> Thank you!



Sun, 28 Aug 2005 02:03:01 GMT  
 Accesses to a Com Dll and to a ActiveX Control Element
OK, thank you.

Another question:
If there are many instances created, either of the Com Dll or the ActiveX
Control, will there be a difference in memory usage between both versions?



Quote:
> ActiveX is a COM dll with User Interface.
> Sometimes developers are making regular COM objects as ActiveX just to
have
> it in Toolbox in VB rather  than add it to references.

> There is no performance benefits. But ActiveX object should implement a
lot
> more mandatory interfaces ( to allow interactions with container) than
> simple COM object.

> George.



> > Hi,

> > I'm working on a Dll for use in Visual Basic.
> > It's a Com Dll version of an equal ActiveX Control Element.

> > Now I'd like to know:
> > If I'm accessing them often in a short time, which version would be
> better?
> > The Com Dll or the ActiveX Control?

> > Thank you!



Sun, 28 Aug 2005 03:15:52 GMT  
 Accesses to a Com Dll and to a ActiveX Control Element

Quote:

> I'm working on a Dll for use in Visual Basic.
> It's a Com Dll version of an equal ActiveX Control Element.

> Now I'd like to know:
> If I'm accessing them often in a short time, which version would be better?
> The Com Dll or the ActiveX Control?

The reason to use a control (if it's not something that's intrinsically
a control) is if it needs to do asynchronous message handling in
concert with Windows.  An example is the timer control, which needs to
be a control so that it has a window to receive messages.

Otherwise, it's better to just do it as a plain COM object.

--
Craig Powers
MVP - Visual C++



Sun, 28 Aug 2005 06:43:24 GMT  
 Accesses to a Com Dll and to a ActiveX Control Element

Quote:

> > I'm working on a Dll for use in Visual Basic.
> > It's a Com Dll version of an equal ActiveX Control Element.

> > Now I'd like to know:
> > If I'm accessing them often in a short time, which version would be
better?
> > The Com Dll or the ActiveX Control?

> The reason to use a control (if it's not something that's
intrinsically
> a control) is if it needs to do asynchronous message handling in
> concert with Windows.  An example is the timer control, which needs to
> be a control so that it has a window to receive messages.

A timer control is not a good example. It is invisible at runtime, so it
has to explicitly create a hidden window to process timer messages
anyway. It is only made a control so as to be available to VB property
browser at design time. Other than that, it could just as well be
implemented as a UI-less COM component.
--
With best wishes,
    Igor Tandetnik

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



Sun, 28 Aug 2005 07:42:23 GMT  
 Accesses to a Com Dll and to a ActiveX Control Element

Quote:




> > > I'm working on a Dll for use in Visual Basic.
> > > It's a Com Dll version of an equal ActiveX Control Element.

> > > Now I'd like to know:
> > > If I'm accessing them often in a short time, which version would be
> better?
> > > The Com Dll or the ActiveX Control?

> > The reason to use a control (if it's not something that's
> intrinsically
> > a control) is if it needs to do asynchronous message handling in
> > concert with Windows.  An example is the timer control, which needs to
> > be a control so that it has a window to receive messages.

> A timer control is not a good example. It is invisible at runtime, so it
> has to explicitly create a hidden window to process timer messages
> anyway. It is only made a control so as to be available to VB property
> browser at design time. Other than that, it could just as well be
> implemented as a UI-less COM component.

OK, I guess that's what I get for trying to make sense of an otherwise
bad decision.  Of course, the timer control is not the only one that
does this.

--
Craig Powers
MVP - Visual C++



Sun, 28 Aug 2005 23:39:42 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. accessing param elements of an object tag from an activex control:

2. Problem using activex control inside ATL com dll

3. COM Dll with MFC Dialog containing an ActiveX Control

4. Using the CommonDialog ActiveX Control from within an ATL COM dll

5. accessing objects in a c++ DLL from a c++ activeX control placed in a VB application

6. accessing objects in a c++ DLL from a c++ activeX control placed in a VB application

7. Chaching HTML elements in a ActiveX control

8. Problem accessing user control element from javascript

9. Are all toolbar controls are ActiveX COM controls?

10. Accessing VJ++ COM DLL From VC++ DLL

11. How to add ActiveX controls to a Activex DLL

12. ActiveX DLL versus ActiveX control

 

 
Powered by phpBB® Forum Software