In the process of a building a generic mechanism for automatically
exposing ST classes as IDispatch interfaces (i.e. pure dispinterface) I
have had cause to subclass AXDispatchImpAbstract. I think I've found a
bug in
AXDispatchImpAbstract>>Invoke:riid:lcid:wFlags:pdispparams:pvarResult:pexcepinfo:puArgErr:
It fails on my system (English - Australian) because of the following
code at the head of the method:
| hr errDesc selector |
(lcid == 0 or: [lcid = LOCALE_USER_DEFAULT or: [lcid =
LOCALE_SYSTEM_DEFAULT]])
ifFalse: [^E_INVALIDARG].
the lcid that's coming through matches none of the three cases, but it
does match the value of:
KernelLibrary default getSystemDefaultLCID
which is English - United States
Invoke is being sent by IScriptControl (I'm testing by scripting Dolphin
from JScript).
So, I think the above test needs to be extended to match
0
LOCALE_USER_DEFAULT
LOCALE_SYSTEM_DEFAULT
KernelLibrary default getSystemDefaultLCID
KernelLibrary default getUserDefaultLCID
Theoretically you can't cache the last two because the use can change
locale at any time (maybe that only applies to the UserDefaultLCID).
This may be a bug in the Script Engine, or it may be that I'm not doing
something properly in my code, but I can't see anything.
-------------------------
Antony Blakey
mailto:
[hidden email]
Linkuistics Pty Ltd
Adelaide, South Australia