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
2 answers

C# Late Binding for Parameterized Property

I'm trying to use late binding to connect to a COM automation API provided by a program called Amibroker, using a C# WinForms project. So far I've been able to connect to everything in the API except one item, which I believe to be a "parameterized…
optim
  • 3
  • 3
0
votes
2 answers

Achieve generic method invocation depending on the type given

I have some (non)generic functions explicitly assigned to a DbSet (using Entity Framework 6.1, but the question is more generic, in a sense): //Non-generic type method public static IQueryable BuildQuery(this DbSet dbSet) { return…
Nick Louloudakis
  • 5,856
  • 4
  • 41
  • 54
0
votes
1 answer

word automation late binding Replace Bookmark returns TargetinvocationException 'The range cannot be deleted'

At the moment I'm working with Word.dotx files that hold several bookmarks which are being altered by a c# program. For a Rebranding project I need to add several new bookmark fields and my predecessor code does reference to the Text Form Field…
Schuere
  • 1,579
  • 19
  • 33
0
votes
1 answer

C# Activator.CreateInstance generic instance getting lost

FYI: the verbose preamble is to help explain why I am using Activator.CreateInstance. I have a number of entities (objects corresponding to database column information) that are "contained" in multiple databases, each of which has a different…
jayflo
  • 1,105
  • 1
  • 12
  • 21
0
votes
1 answer

Excel 2010 late binding on Access 2010 Project

So i have this typical problem of distributing an Access application to a client. The application is written in Access 2010 and recently i addded some code to export Excel sheets. Therefore i added the excel object library version 14.0. My clients…
rpd
  • 462
  • 1
  • 9
  • 24
0
votes
1 answer

How create variables of types in COM object using late binding?

This is probably a noob question but seems that despite checking 15+ resources I'm still missing one thing in working with COM interfaces in .NET. I'd like to unzip a file using Windows Shell. (My goals: works with Windows XP and higher, no 3rd…
miroxlav
  • 11,796
  • 5
  • 58
  • 99
0
votes
1 answer

keep around a piece of context built during compile-time for later use in runtime?

I'm aware this might be a broad question (there's no specific code for you to look at), but I'm hoping I'd get some insights as to what to do, or how to approach the problem. To keep things simple, suppose the compiler that I'm writing performs…
One Two Three
  • 22,327
  • 24
  • 73
  • 114
0
votes
1 answer

Why did it fail ,idispatch interface which get by AccessibleObjectFromEvent.call the idispatch's member

I get a ms-word's handle,then use AccessibleObjectFromEvent to get is's IDispatch(late bingding)。then I want call it's property or method,it's fail。 but it's ok use c#. How to use use late binding to get excel instance? the code like this. function…
chenybin
  • 1
  • 4
0
votes
1 answer

Whats a good way to switch between two "using" statements in a compiled library?

I'm sectioning off pieces of a solutions into individual solutions and integrating them into an Atlassian Bamboo build/deploy environment. I have a site, a WCF with Windows Workflow Foundation, and a library containing all the classes that are…
CarComp
  • 1,929
  • 1
  • 21
  • 47
0
votes
1 answer

Set cache handler at object level?

Say I have a base object, CacheObject: abstract class CacheObject { protected static $handler = null; public static function setCacheHandler($handler) { static::$handler = $handler; } public static function…
Kaitlyn2004
  • 3,879
  • 4
  • 16
  • 16
0
votes
1 answer

Abstract class and subclass, and method invocation

Good day everybody. I have some confusion about abstract superclass and subclasses in servlets: I have abstract servlet superclass: public abstract class CatalogPage extends HttpServlet { public CatalogPage() { super(); } …
Vad
  • 75
  • 4
  • 10
0
votes
2 answers

Spring batch late binding for stepExecutionContext not working

I am using Spring batch application and want to use late binding for stepExecutionContext. I am facing issues in resolving my error. Following is my reader which has sql property using late binding:
de.coding.myth
  • 125
  • 1
  • 9
0
votes
0 answers

TWIG how to implement late binding

how to implement (or use if it is supported) kind of late binding in TWIG. how to transfer variable between few renders through the same instance here is close situation with the detailed description: Lets imagine i have global layout…
Eugene
  • 1,680
  • 3
  • 14
  • 23
0
votes
2 answers

Action to call a method based on a string value

Is there a way to use Action to call a method based on a string value that contains the name of that method?
joemoe
  • 5,734
  • 10
  • 43
  • 60
0
votes
1 answer

Can I make a column's value late databound?

I have a table with a few columns and I'd like to add a column withouth providing it a value a first because it's a (somewhat) complex object that might not be useful everytime the table is used. So my current code looks like this: var…
Serge
  • 6,554
  • 5
  • 30
  • 56