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.