 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
Posted: Wed Jul 11, 2007 1:01 am Post subject: |
|
|
| erictheturtle wrote: | | There is the alternative to first Invoke the member name as a Method, and if it fails (DISP_E_MEMBERNOTFOUND), then try Invoking it again as a Property. Doing this should have the same effect. |
I think this process is essentially what IDispatch's Invoke() does!
Actually I built a conjecture, which led me to the idea of grouping InvKind, which is the following:
Fist it checks whether Method bit-field (:1) is set on with nFlags, if so search the Method function and if find it, execute it. Otherwise, move on to next PropertyGet bit-field (:2), and on and on.
You may experiment yourself with extreme case: nFlags to 0xF.
| Quote: | | However I'm still a little worried there is a COM object out there that will somehow have a Method and a PropertyGet with the same name. |
I would say then the COM object was badly designed.
Let's just put aside the consideration of the case until actually meet it. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10716
|
|
| Back to top |
|
 |
Guest
|
Posted: Tue Oct 16, 2007 7:51 am Post subject: |
|
|
Why should the com DLL version die, even though there are com functions now?
It seems the main advantage of the COM functions is if you were going to integrate those functions into the AutoHotkey language at some point. The COM DLL would be if you were not or wanted to keep them separate for the time being. |
|
| Back to top |
|
 |
erictheturtle
Joined: 27 Jun 2007 Posts: 101 Location: California
|
Posted: Wed Oct 17, 2007 6:59 pm Post subject: |
|
|
I was willing to supply the core COM functions to make COM work in AHK. I questioned Chris about what plans there were for how COM should be implemented in AHK. He said there hasn't been any plan made.
Without changing the AHK syntax, the only ways I see of using COM are the two ways now established: making the raw COM dll calls directly (Sean's method), or embedding a completely different language syntax within the AHK code (ws4ahk method).
When using COM, I have always assumed people prefer a 'dot' syntax similar to Visual Basic or AutoIT (i.e. Object.Method()). I'm really not sure how such syntax might be integrated into AHK. Maybe there is a better syntax, or another syntax people would prefer.
But that's about as far as I want to delve into it. I would rather not tackle creating a specification for how the COM syntax, exception handling, and other stuff should all work in AHK. Perhaps another brave soul would be willing to create such a plan? If there was an accepted plan of how COM should be handled in AHK, I would certainly be willing to create some of the code to help with it. _________________ -m35 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|