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

Excel/vba latebinding HTML email

I have some code written in VBA designed to run in excel which is supposed to send a html email. This worked fine originally but I have tried to late bound me code, an email is still sent however the HTML appears as plain text to the recipient. The…
skifans
  • 125
  • 1
  • 6
0
votes
1 answer

Excel to Outlook Contact, Object doesn't support this property or method

This code deletes all contacts in a subfolder then shoots an updated sheet from excel into the proper contact input values for outlook. I am getting the error: RUN TIME ERROR 438 - OBJECT DOESN'T SUPPORT THIS PROPERTY OR METHOD at the…
slightly drifting
  • 302
  • 1
  • 4
  • 16
0
votes
1 answer

Iterate ActiveX collection object with late bind interop on C# (COMAdminCatalogCollection)

I need to iterate COM+/ActiveX collection objects using late bind interop in C#. At this very moment I need to iterate COMAdmin.COMAdminCatalogCollection, from GetCollection("Applications") method in COMAdmin.COMAdminCatalog. But as it is a POC to…
MFedatto
  • 134
  • 2
  • 16
0
votes
0 answers

MissingMethodException in CreateInstance using ETW SLAB

I am trying to understand a late-binding issue i am having. I am trying to implememnt an out-of-process customsink as described here: https://msdn.microsoft.com/en-us/library/dn775003(v=pandp.20).aspx I have created this test so you can quickly see…
Mickey Perlstein
  • 2,508
  • 2
  • 30
  • 37
0
votes
2 answers

Late binding on CreateProcess with C# returns null value

I'm trying to use late binding on CreateProcess function in kernel32.dll, however, it returns a null value unlike any other function. Here's the code I'm using for the late binding public abstract class LateBinding { [DllImport("kernel32.dll",…
0
votes
1 answer

WPF DataGridRow.Item("xx") - Option Strict On disallows late binding

WPF application using DataGrid. User double-clicks on a cell, and I need to get the value of another cell in that row. Dim dep As DependencyObject = DirectCast(e.OriginalSource, DependencyObject) Dim dgRow As DataGridRow = Nothing While dep IsNot…
tolsen64
  • 881
  • 1
  • 9
  • 22
0
votes
2 answers

Late Binding in VB

From what I have read so far, late binding is defining a variable as Object and then assigning it to the actual object later which is actually done at run time. I don't understand the point to that. Maybe this is the Java in me, but doesn't that…
Tom K
  • 321
  • 1
  • 4
  • 15
0
votes
2 answers

Code using PowerPoint Object Library 15.0 does not work on machines with library 14.0

I have a VBA macro that creates a PPT deck from rows in Excel. It works great on my PC (with PowerPoint Object Library 15.0), but when I distribute to people with an older PowerPoint Object Library (e.g., 14.0), it hoses the format of pasted…
0
votes
2 answers

concept involved here in function calling and argument passing

while reading through vptr and vtable concept i got this wonderful piece of code, but i am not able to make out the concept involved here: #include using namespace std; class A { public: virtual void foo(int x = 10) { cout <<…
0
votes
3 answers

Interface, Abstract Class and Methods of Abstract Class

I am learning how to use the Factory pattern for creating objects in Java. I want to create classes to manage Cars. A car can either be small or large. I created an interface that defines the methods to be implemented by an implementing class. An…
Akinkunle Allen
  • 1,299
  • 12
  • 19
0
votes
2 answers

Late Binding vs. Early Binding with Embedded Word Documents

I am having issues getting my embedded document to run on older version of MS Office. I believe the issue lies in how I am declaring my objects, but am unsure how to declare my embedded documents using late binding (I'm still very new to both this…
Sooji
  • 169
  • 3
  • 18
0
votes
0 answers

How to create a shortcut?

I need to create shortcuts for selected files within selected folders. On several sites (including stackoverflow) I found the following code: Private Sub MakeShortcut(ByVal File As String, ByVal ShortcutFolder As String, ByVal Name As String,…
0
votes
1 answer

How allow for '.' in an Excel file name when 'saving as' using late binding?

I just came up with this issue, we have a library that uses Reflection to manipulate Excel files. When a user is trying to save a file that has a . in the file name (eg: 01.02.xls) it won't include .xls in the saved file (result:…
user3223834
  • 59
  • 1
  • 1
  • 9
0
votes
3 answers

How to modify a boxed value type inside a method

I'm tring to build a library for simplifing late binding calls in C#, and I'm getting trouble tring with reference parameteres. I have the following method to add a parameter used in a method call public IInvoker AddParameter(ref object value) …
Ricardo Amores
  • 4,597
  • 1
  • 31
  • 45
0
votes
1 answer

Spring Batch: unit test late binding

I have reader configured as below: