Jump to content

Late Binding


Recommended Posts

I'm trying to perform something that is called "Late Binding".

I want to use an ActiveX/COM object that has not been registered with the computer.

I'm doing some POC code with an application called DynaZip to see if it will work for us, but I need to distribute the COM .dll files with my exe and since many of our end users only have Users access, I can't use the RegSrv32 because they can't modify HKLM.

If Late Binding is not possible, does anybody have any other ideas on how I can use a COM object that I can't get registered?

Thanks,

Mike

Link to comment
Share on other sites

I don't think you understand what late binding really is. Yes, AutoIt can do late binding, that's how COM is implemented. The COM objects are not bound until run-time and are bound via their IDispatch interface - hence late-binding. This is opposed to early-binding which is done at compile time.

What you are looking to do is use an unregistered COM object. You will have to invoke the class factory in the DLL yourself. This could be very tricky depending on how the DLL is implemented. In reality, it should be as simple as a little DllStruct stuff and calling the DLL's exported DllGetClassObject() function with DllCall() and using the undocumented "idispatch_ptr" type for the final parameter. Assuming the type you are getting supports IDispatch, you can get access to it's automation interface this way.

Edit: I guess you are doing late-binding but that's not the crux of your issue. As mentioned, late-binding is simply using the automation interface to "bind" to the object at run-time. You are doing this but that is not the support you need to actually instantiate the object.

Edited by Valik
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...