Early bind and Late bind in VB. 
Author Message
 Early bind and Late bind in VB.

Hi,

    Do anybody have an ideal on "Early bind and Late bind" in VB ?
Or can introduce me to any article on internet ?

Thanks in advance.

--
XINXIN



Tue, 13 Apr 2004 14:33:37 GMT  
 Early bind and Late bind in VB.
It helps to know C to completely understand the difference, however,
from a practical point of view, in early binding, VB reads the type
library and finds out the methods, events, and properties that are
availble. This cuts down on development time because mispellings are
elminated. In late binding these errors are found at execution time.
Here is Microsoft's online MSDN. Go to the topic Component Development
Automation
Introduction
Table of Contents
for a complete explanation. In particular see the topics for early and
late binding:
Accessing Objects Through IDispatch
and
Accessing Object Through the VTBL.
Bobby
Quote:

> Hi,

>     Do anybody have an ideal on "Early bind and Late bind" in VB ?
> Or can introduce me to any article on internet ?

> Thanks in advance.

> --
> XINXIN




Wed, 14 Apr 2004 04:08:52 GMT  
 Early bind and Late bind in VB.
In a most basic sense, early-binding means that VB knows about the interface
exposed by the object.  Within the IDE, this will give you the Intellisense
functionality and can potentially reduce runtime errors.  However, the real
benefit is that the interface definitions get compiled into the executable.
This means the interface doesn't need to be obtained at runtime and results
in a dramatic increase in performance over late-binding.  With late-binding,
your program knows nothing about the interface and must determine it at
runtime.  This requires several additional calls to COM.  You should use
early-binding almost all the time.

To use early-binding, you must add a reference, via the References dialog
box, to the component which exposes the object.  Then, you must declared
your object variable to be that specific object type (IOW, do not declare
the object variable As Object because that will still be late-bound).

There are, however, valid reasons for using late-binding.  For example, I
use late-binding for an application in order to allow clients to customize
to their specific needs.  The application ships with standard features
implemented in DLLs.  Some clients want or require additional functionality
(for which there is an extra fee involved).  All I need to do is give them
the new DLL with the only restriction in writing the customized DLL being
that the public interface not change. Because it's late-bound, I don't need
to change the client application at all.  If I used early-binding for this,
I'd have to re-write and recompile a different client EXE for every client
(customer) that wanted customization and then keep track of which client was
using which EXE, etc., etc.  IOW, it'd be a real mess.

Mike


Quote:
> Hi,

>     Do anybody have an ideal on "Early bind and Late bind" in VB ?
> Or can introduce me to any article on internet ?

> Thanks in advance.

> --
> XINXIN




Wed, 14 Apr 2004 10:20:23 GMT  
 Early bind and Late bind in VB.
You may also check this article,

Q138138 INFO: Late, ID, Early Binding Types Possible in VB for Apps
http://support.microsoft.com/support/kb/articles/q138/1/38.asp

Regards,
Gang
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. 2001 Microsoft Corporation. All rights
reserved.



Fri, 16 Apr 2004 16:45:08 GMT  
 Early bind and Late bind in VB.
It is possible to use Early binding and upgrade DLL's (add another methods)


Quote:
> You may also check this article,

> Q138138 INFO: Late, ID, Early Binding Types Possible in VB for Apps
> http://support.microsoft.com/support/kb/articles/q138/1/38.asp

> Regards,
> Gang
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> You assume all risk for your use. 2001 Microsoft Corporation. All rights
> reserved.



Wed, 21 Apr 2004 06:49:36 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Early binding and Late binding in VB.

2. Early binding and Late binding in VB.

3. early binding vs late binding

4. Activex Server - Early Binding vs. Late Binding

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

6. * Early binding or late binding

7. Early binding and Late binding

8. early binding / late binding

9. Early Binding and Late Binding

10. early binding vs late binding

11. Early Binding - Late Binding

12. Powerpoint with early or late binding but INVISIBLE

 

 
Powered by phpBB® Forum Software