AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

"EasyCOM.dll" development
Goto page Previous  1, 2, 3
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Sean



Joined: 12 Feb 2007
Posts: 2462

PostPosted: Wed Jul 11, 2007 1:01 am    Post subject: Reply with quote

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
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10716

PostPosted: Wed Aug 01, 2007 6:45 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Tue Oct 16, 2007 7:51 am    Post subject: Reply with quote

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

PostPosted: Wed Oct 17, 2007 6:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group