Questions tagged [late-binding]

Late binding is a mechanism in which the method being called upon an object is looked up by name at runtime.

Late binding is a mechanism in which the method being called upon an object is looked up by name at runtime.

The specific type of a late bound object is unknown to the compiler at compile time. This is contrasted with early binding, where relationships between objects, methods are properties are established during compile time.

It is expected that questions tagged specifically relate to programming using late bound code. You should also tag your post with the specific programming language being used.

Example (VBA):

' late bound objects are declared As Object
Dim obj As Object
Set obj = CreateObject("Excel.Application")

Related Tags:

353 questions
0
votes
1 answer

Late binding/resolution by jvm helps prevent breking of code of current method for changes in class it uses

read it in jvm spec that Late binding/resolution of methods and variables by jvm helps prevent breaking of code in current method if there are any changes in some class it uses. This does not make it clear enough . How is late binding helpful in…
0
votes
0 answers

Late Binding C#4.0

I have multiple solution which contains multiple projects and with all combined gives my application. Following is the dependency in which my solutions are built: Solution 1 Solution 2 Solution 3 ... Solution 14 Solution 15 Solution 14 uses some of…
rohit sharma
  • 105
  • 2
  • 13
0
votes
1 answer

Calling Latebinding Subroutine in every Subroutine

First, I would just like to state that I need to use LateBinding due my program running in different machines with different versions of excel. I have declared a Public Sub in a module that can be called to initiate the creation of object for the…
Sancho Almeda
  • 151
  • 2
  • 14
0
votes
1 answer

Is there a better way to store c# event information in a database than storing it's name and using late binding to execute it?

I'm designing a card game (think Magic the Gathering for purposes of this example) and want to take the information for the cards and store it in a database. In this game, there are events (for instance, one card might say "when this comes into…
Mike Beck
  • 35
  • 4
0
votes
1 answer

How to fetch members of a dynamic marketing list independingly of the query

I'm trying to get the list of members of a dynamic marketing list. When it's only a single (or just a few) lists, I could fetch the results of the underlying query individually. However, when the number of marketing lists raises, the fetching…
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
0
votes
1 answer

How to use Activator.CreateInstance to instantiate an external class?

I have an application where I want to instantiate a class that is completely outside the application, perhaps written at a later date by a third party. So the class cannot be known, but the interfaces in the class are known. So I want to use late…
Jay Imerman
  • 4,475
  • 6
  • 40
  • 55
0
votes
1 answer

Late Binding Technique with Interface perhaps

Please consider the following scenario: Class Class1 Function Func() as String End Function End Class Class Class2 Function Func() as String End Function Function Func2() as String End Function End Class Class Class3 Function…
0
votes
1 answer

How to release late bound COM objects?

I guess I do have to release also late bound COM objects. But how is this done directly? In my situation I use the following code from C# to get the focused point from Google Earth (simplified): Type oClassType =…
Marc
  • 9,012
  • 13
  • 57
  • 72
0
votes
1 answer

Late Binding DirectX DirectSound in VB6

I am working on a DirectSound application which needs to work both on WindowsXP and Windows7. The objects used are simply sound buffers, but are currently early bound: Private dx As DirectX8 Private ds As DirectSound8 Private mdsBuf As…
Guillermo Phillips
  • 2,176
  • 1
  • 23
  • 40
0
votes
1 answer

Creating a com object with another com object in C#

This is a follow up to a previous question. I'm trying to convert some Vb.net code to C#. A com object is created (atlDirectorObject.atlDirector) and it is used to create another com object (atl3270Tool) by parameter. atl3270Tool is not getting…
Theo
  • 81
  • 9
0
votes
1 answer

How clone method and cloneable interface are interlinked while compile time?

If you implement an interface compiler asks you to provide implementation of those methods. But in case of calling overridden clone() method how compiler come to know that a particular interface is not mentioned (here in this case Cloneable) in…
Amaresh
  • 331
  • 2
  • 5
  • 14
0
votes
1 answer

Early binding of Microsoft.Office.Interop.Word.WordBasic call in VB.NET

I'm trying to call this code in VB.NET with "option strict on": Dim application As word.Application = New word.Application application.WordBasic.DisableAutoMacros(1) The WordBasic object is dynamic, there is no type library available. Now the…
Michael Böckling
  • 7,341
  • 6
  • 55
  • 76
-1
votes
1 answer

Late Binding Issue with "MSXML2.XMLHTTP60"

I am getting a Run-time error '429': ActiveX component can't create object error when I try to run the following code. Option Explicit Private Sub EarlyVsLateBinding() ' References to both the Microsoft Scripting Runtime and Microsoft XML,…
TehDrunkSailor
  • 633
  • 4
  • 11
-1
votes
1 answer

Does destructing objects stop the late binding?

Consider the following C++ classes inheritance hierarchy and their intended polymorphic behaviour. #include using namespace std; class A { public: A () { cout << "A constructor\n"; } virtual void display() { cout << "A display\n"; } …
user3112666
  • 1,689
  • 1
  • 12
  • 12
-1
votes
1 answer

Option Strict On disallows late binding in vb.net

I'm using COM interface to 3rd part program to get information with my functions. (VS2017 and Framework 4.7.2). I'm getting an error from Visual Studio: "Option Strict On disallows late binding" for the below function 'x, y, z, al, be, ga. as an…
user8666372
1 2 3
23
24