Early Binding and Late Binding 
Author Message
 Early Binding and Late Binding

Hello
Pls. somebody clarify my doubt. What I understand from the documentation is
that when u give reference to the TypeLib it becomes early binding. That
means it could be Vtable or DispID binding as they are two types of early
binding. Documentation says VB does vtable binding whenever possible. That
means in VB DispID binding doesn't takes place at all. Pls. let me know how
to do DispID binding?

Early Binding (Vtable???)
a. Give TypeLib reference.
b. Declare the object of specific type.
c. Use New method to create an object.

Late Binding
a. Declare a generic object
b. Use CreateObject method.

Thanks,
Vinayak



Mon, 10 Feb 2003 03:00:00 GMT  
 Early Binding and Late Binding

Quote:
> Hello
> Pls. somebody clarify my doubt. What I understand from the documentation
is
> that when u give reference to the TypeLib it becomes early binding. That
> means it could be Vtable or DispID binding as they are two types of early
> binding. Documentation says VB does vtable binding whenever possible. That
> means in VB DispID binding doesn't takes place at all. Pls. let me know
how
> to do DispID binding?

I think that DISPID binding will occur if the object is declared using a
dispinterface.

Quote:
> Early Binding (Vtable???)
> a. Give TypeLib reference.
> b. Declare the object of specific type.
> c. Use New method to create an object.

Or use CreateObject. Doesn't matter what you use to create the object (you
can use CoCreateInstance if you want), what makes an object early/late bound
is how the variable is declared.

Quote:
> Late Binding
> a. Declare a generic object
> b. Use CreateObject method.

Or use New if the typelib is referenced.

--
Eduardo A. Morcillo
http://www.domaindlx.com/e_morcillo



Mon, 10 Feb 2003 03:00:00 GMT  
 Early Binding and Late Binding

What about DispID binding? How to do it??



Quote:
> > Hello
> > Pls. somebody clarify my doubt. What I understand from the documentation
> is
> > that when u give reference to the TypeLib it becomes early binding. That
> > means it could be Vtable or DispID binding as they are two types of
early
> > binding. Documentation says VB does vtable binding whenever possible.
That
> > means in VB DispID binding doesn't takes place at all. Pls. let me know
> how
> > to do DispID binding?

> I think that DISPID binding will occur if the object is declared using a
> dispinterface.

> > Early Binding (Vtable???)
> > a. Give TypeLib reference.
> > b. Declare the object of specific type.
> > c. Use New method to create an object.

> Or use CreateObject. Doesn't matter what you use to create the object (you
> can use CoCreateInstance if you want), what makes an object early/late
bound
> is how the variable is declared.

> > Late Binding
> > a. Declare a generic object
> > b. Use CreateObject method.

> Or use New if the typelib is referenced.

> --
> Eduardo A. Morcillo
> http://www.domaindlx.com/e_morcillo



Mon, 10 Feb 2003 03:00:00 GMT  
 Early Binding and Late Binding

Quote:
> What about DispID binding? How to do it??

The only way of doing it in VB is calling IDispatch::Invoke directly.

--
Eduardo A. Morcillo
http://www.domaindlx.com/e_morcillo



Mon, 10 Feb 2003 03:00:00 GMT  
 Early Binding and Late Binding

Hello
I am sorry it may be very simple stuff.
I will give a reference to typelib.
Declare an object of a specific type and create the object using
createobject method. In this case it must be early binding? Pls. comment.

Thanks a lot
vinayak

Quote:
> The only way of doing it in VB is calling IDispatch::Invoke directly.

> --
> Eduardo A. Morcillo
> http://www.domaindlx.com/e_morcillo



Tue, 11 Feb 2003 11:49:49 GMT  
 Early Binding and Late Binding

There are actually 3 different types of binds:

1) vtable bind
    When you provide for vtable access in your component with all functions
as offsets (as defined in COM). You will have the type library for this and
declare the variable as a specific type.
2) IDispath - early id binding
    vtable entries do not exist beyond IDispath interface functions but
typelibrary is available. You must declare the type library for this and
declare the variable as a specific type.
3) IDispath - late binding
    Do not know type of the object. Do not have type library, hence can not
declare variable specific type.

Hope this helps.


Quote:
> Hello
> I am sorry it may be very simple stuff.
> I will give a reference to typelib.
> Declare an object of a specific type and create the object using
> createobject method. In this case it must be early binding? Pls. comment.

> Thanks a lot
> vinayak

> > The only way of doing it in VB is calling IDispatch::Invoke directly.

> > --
> > Eduardo A. Morcillo
> > http://www.domaindlx.com/e_morcillo



Tue, 11 Feb 2003 03:00:00 GMT  
 Early Binding and Late Binding

Quote:
> Hello
> I am sorry it may be very simple stuff.
> I will give a reference to typelib.
> Declare an object of a specific type and create the object using
> createobject method. In this case it must be early binding? Pls. comment.

It will be early binding if the type is an interface (it has a vtable),
dispid binding if the type is a dispinterface or late binding if the
interface is IDispatch (same as Object).

--
Eduardo A. Morcillo
http://www.domaindlx.com/e_morcillo



Tue, 11 Feb 2003 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. early binding vs late binding

2. * Early binding or late binding

3. Early binding and Late binding

4. Early binding and Late binding in VB.

5. Early bind and Late bind in VB.

6. Early binding and Late binding in VB.

7. early binding vs late binding

8. Activex Server - Early Binding vs. Late Binding

9. Late Binding vs Early Binding in out-of-process servers

10. early binding / late binding

11. Early Binding - Late Binding

12. Powerpoint with early or late binding but INVISIBLE

 

 
Powered by phpBB® Forum Software