Board index » delphi » Com or Automation Object to use in VB

Com or Automation Object to use in VB

Hi:

I'm new to COM, and still very confused.

Should I use the Delphi COM-wizard or the Automation Object-wizard when
I want to use my object from VB?

What is the difference between COM and Automation Object (inprocess
server)?  The Automation Object adds the IDispatch interface (if I'm
correct).  But do I need this interface?

A little help can do wonders ...

Ivan

Sent via Deja.com http://www.deja.com/
Before you buy.

 

Re:Com or Automation Object to use in VB


In article <7unpuh$h6...@nnrp1.deja.com>,

Quote
  eulae...@online.be wrote:
> Should I use the Delphi COM-wizard or the Automation Object-wizard
when
> I want to use my object from VB?

Use the Automation wizard for any object you wish to use in VB.  VB can
only talk to COM objects that implement IDispatch.

Quote
> What is the difference between COM and Automation Object (inprocess
> server)?  The Automation Object adds the IDispatch interface (if I'm
> correct).  But do I need this interface?

An Automation object is a dual interface COM object, meaning that it
supports early or late binding.  Late binding is slow, early fast.
Typeless languages like VB use late binding.

An automation object can be used out of process.  To do this in delphi
create a new automation object in a regular project an run the app to
register the object.

Andrew

Sent via Deja.com http://www.deja.com/
Before you buy.

Re:Com or Automation Object to use in VB


If I use an Automation Object will this influence my performance if I
write the client in Delphi (and not in VB) or if I call my object from
ASP?

Regards,

Ivan

Sent via Deja.com http://www.deja.com/
Before you buy.

Re:Com or Automation Object to use in VB


Quote
eulae...@online.be wrote in message <7unpuh$h6...@nnrp1.deja.com>...
>Hi:
>........................................................
>What is the difference between COM and Automation Object (inprocess
>server)?  The Automation Object adds the IDispatch interface (if I'm
>correct).  But do I need this interface?

See Bynh Ly COM Page at http://www.intac.com/~bly/com/ to answer theese and
more questions

Cheers, Nick

Re:Com or Automation Object to use in VB


Quote
> If I use an Automation Object will this influence my performance if I
> write the client in Delphi (and not in VB) or if I call my object from
> ASP?

In Delphi, for best performance in the client always put the type
library in the uses clause and declare the object as follows:

  MyObj: IMyAutomationObject;

If you declare it like this:

  MyObj: Variant;

It will be slow.

You can include your type library in a VB project as well so the
performance difference between Delphi vs VB may be negligible.

As for ASP, I'm not sure.  If you were creating it from inside an
Active Server Object the performance would be the same (assuming you
early bind with the typelib)

Cheers,
Andrew

Sent via Deja.com http://www.deja.com/
Before you buy.

Other Threads