This content has been marked as final. Show 7 replies
Thanks for your reply.
I have developed it using VB 6.0. Please check the below code.
At the time when I ran this program I got an runtime error "49', bad DLL calling convention.
'' General Declaration Option Explicit Private Declare Function isJavaWindow Lib "WindowsAccessBridge" (Hwnd As Long) As Boolean Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hwnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Private Declare Function FindWindow _ Lib "user32.dll" _ Alias "FindWindowA" (ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long Private Sub Form_Load() Dim Var_g_HwndRec As Long Dim lb As Long Var_g_HwndRec = FindWindow(vbNullString, "CI for a proportion") lb = LoadLibrary("WindowsAccessBridge") MsgBox isJavaWindow(Var_g_HwndRec) End Sub
Can you please tell me that what could be the problem?
Please note that, if we execute the "Windoes_run" function (Which is void and no parameters ) from WindowsAccessbridge.dll then it works fine with no error.
But if we try to execute "isJavaWindow(Java Window Handle)" the it gives error.
Could you please let us know if anything else could be done to run the other functions which takes parameters.
Even I tried running the Java Acess bridge code (2.0.1) with JDK 1.6.06 but unable to get the required output for Java monkey or Ferret code.
Please review the programming documentation that is part of the Java Access Bridge for Windows. This is typically installed into file:///C:/Program%20Files/Java%20Access%20Bridge/doc/ (and specifically look at the file api.html). Also please look at the sample source code for the examples - e.g. JavaFerret - which is typically installed into file:///C:/Program%20Files/Java%20Access%20Bridge/src.zip/bridge/src - e.g. file:///C:/Program%20Files/Java%20Access%20Bridge/src.zip/bridge/src/JavaFerret.cpp
With these, you should note that before you can use the Java Access Bridge, you need to call initializeAccessBridge() (and when you are finished, call shutdownAccessBridge()).
We do not provide general programming support for the bridge - and most especially not for languages like VisualBasic (for which this wasn't designed). Specifically, I cannot help you "run the other functions which takes parameters". You need to figure that out on your own. And I suggest starting with a thorough study of the JavaFerret source code. If you can replicate some portion of that code in a working VisualBasic application, then you will likely be well on your way toward success.
Thanks for the prompt reply, basically I want to get the native java window (Like Java Monkey Application and Java Ferret Application) using java only, for that I tried different ways/options but unable to get the native java window and perform actions on that.
It would be really great if you could guide me for that. I am still unable to start the Java Access Bridge.
Please let me know the steps to get native java window using Java Access bridge and JDK 1.6.20.
Also Note that, As per your previous suggestion, I tried to search and call initializeAccessBridge() (and when you are finished, call shutdownAccessBridge()), But unable to succeed it. I di not find such method in Accessbridge.jar.
Please help me out.
Edited by: user13837581 on Jan 27, 2011 6:50 AM