Sign in to follow this  
Followers 0
Mat

Early binding?

7 posts in this topic

Since I'm programming in other languages a lot more now, I've started hanging around on stackoverflow, and noticed this question:

A colleague of mine uses AutoIt for development and claims that you cannot early-bind com objects - is this true?

What is the answer to that? I assume it binds whenever you call ObjGet or ObjCreate.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

AutoIt itslef can only use objects wich implement IDispatch and uses late-binding.

A simplified explanation, not completely correct bur you should get the idea:

AutoIt does not know the methods of the objec. Each time a method is called, AutoIt uses IDispatch to search and execute the method.

Early-binding means, that you know the methods and call them directly without looking them up.

PS: AutoItObject allows to use such objects, therefor it creates a wrapper object which will function as an interface between IDispatch and the object. The wrapper gets a list of the supported methods and then answers the IDispatch-calls of AutoIt with the corresponding method found in the list.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Thanks ProgAndy, I've replied now :unsure: He meant early binding as in compile time, and I knew that wasn't right.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanks ProgAndy, I've replied now :unsure: He meant early binding as in compile time, and I knew that wasn't right.

Early-binding is at compile time. You have to know the complete interface list at compile time.

(Well, actually that is not entirely correct. With AutoItObject you could create the interface definition at runtime, but this isn't really useful)

Also, AutoIt itself cannot use erly-binding, you need an additional library :>

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Early-binding is at compile time. You have to know the complete interface list at compile time.

(Well, actually that is not entirely correct. With AutoItObject you could create the interface definition at runtime, but this isn't really useful)

Also, AutoIt itself cannot use erly-binding, you need an additional library :>

Yes... Once again proving you can do anything with AutoItObject :unsure:

Share this post


Link to post
Share on other sites

AutoIt can't early bind because it's never compiled as well.

Share this post


Link to post
Share on other sites

AutoIt can't early bind because it's never compiled as well.

That's what I've said :unsure:

Share this post


Link to post
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
Sign in to follow this  
Followers 0