Thanks for your reply PsaltyDS.
In fact my 2 line script returns exactly the same as the example you posted. So I can get as far as DllCall not returning an error.
Let me explain some more...
What I'm trying to do is read the text off a Java screen. I'm using Java Access Bridge 2.0.1 with JDK 1.5.0_12. JDK comes with a demo app swingset. I'm trying to read the strings from the warning dialog example:
First I need the AccessibleContext and vmID. Access Bridge API doc say to use GetAccessibleContextFromHWND.
My script then becomes:
$dll = DllOpen ("WindowsAccessBridge.dll")
$hWindow = WinGetHandle("[Class:SunAwtDialog]")
WinWaitActive ("[CLASS:SunAwtDialog]", "")
$result=DllCall($dll, "int:cdecl", "getAccessibleContextFromHWND", "HWND", $hWindow)
ConsoleWrite (@error &';'&$result[0]&';'&$result[1])
Note the spelling of the function, it fails when you put 'GetAccessibleContextFromHWND'.
My script writes following to the console 0;0;0x000F016E, which tells me the call to the dll went fine (@error = 0), but the rest just returns what I submitted as parameters. I expected to get the AccessibleContext and vmID.