AutoHotkey Community

It is currently May 25th, 2012, 10:57 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: July 11th, 2007, 2:01 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 1st, 2007, 7:45 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
To help bring more attention to Eric's Windows Scripting Host API, I've moved some of the posts that were here to a new topic: Embedded Windows Scripting (VBScript & JScript) and COM


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 16th, 2007, 8:51 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 17th, 2007, 7:59 pm 
Offline

Joined: June 27th, 2007, 9:07 pm
Posts: 101
Location: California
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 21 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group