Mat Posted May 5, 2011 Share Posted May 5, 2011 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. AutoIt Project Listing Link to comment Share on other sites More sharing options...
ProgAndy Posted May 5, 2011 Share Posted May 5, 2011 (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 May 5, 2011 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 Link to comment Share on other sites More sharing options...
Mat Posted May 5, 2011 Author Share Posted May 5, 2011 Thanks ProgAndy, I've replied now He meant early binding as in compile time, and I knew that wasn't right. AutoIt Project Listing Link to comment Share on other sites More sharing options...
ProgAndy Posted May 5, 2011 Share Posted May 5, 2011 (edited) Thanks ProgAndy, I've replied now 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 May 5, 2011 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 Link to comment Share on other sites More sharing options...
Mat Posted May 5, 2011 Author Share Posted May 5, 2011 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 AutoIt Project Listing Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 5, 2011 Share Posted May 5, 2011 AutoIt can't early bind because it's never compiled as well. Link to comment Share on other sites More sharing options...
Mat Posted May 5, 2011 Author Share Posted May 5, 2011 AutoIt can't early bind because it's never compiled as well.That's what I've said AutoIt Project Listing Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now