Jump to content

AutoItX3_x64.dll in java


Recommended Posts

Hello.

I searched for previous information on my problem and found nothing so here goes...

I am running junits in eclipse (Indigo Service Release 2) under Windows 7.

When I make use of a 32 bit JVM and the DLL "AutoItX3.dll" all works fine. But when I try to run the same test with "AutoItX3_x64.dll" and a 64 bit JVM nothing seems to work.

In the 64 bit environment calling, say, AU3_WinGetHandle() will cause my JVM to crash. Method AU3_WinExists() never finds any windows. These both work fine when calling them with a 32 bit JVM and the 32 bit DLL.

The instance of the DLL is accessed via:

AutoItX INSTANCE = (AutoItX) Native.loadLibrary(Context.getAutoItxPath(), AutoItX.class);

What should I be changing?

Thanks.

Michael.

Edited by mremillard
Link to comment
Share on other sites

Sorry, my code guesser doesn't work for Java. You'll have to post your failing code. Maybe you are using wrong datatypes.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Well, let's see...

I have:

public interface AutoItX extends com.sun.jna.Library, Serializable

{

AutoItX INSTANCE = (AutoItX) Native.loadLibrary("[The path to the DLL. Either the AutoItX3.dll or AutoItX3_x64.dll]", AutoItX.class);

public int AU3_WinExists(String szTitle, String szText);

public void AU3_WinGetHandle(String szTitle, String szText, byte[] szRetText, int nBufSize);

etc...

}

Then in a junit I'll have:

static AutoItX lib = AutoItX.INSTANCE;

etc...

lib.AU3_WinGetHandle("", "", buf, buf.length);

etc...

if (lib.AU3_WinExists(pTitle, "") == 1)

{

...

}

else

{

...

}

and so on. This very same code works when in a 32bit JVM using the AutoItX.dll but fails when in a 64bit JVM using the AutoItX_x64.dll.

Note: Loading the AutoItX.dll in a 64bit JVM doesn't work.

Michael

Link to comment
Share on other sites

When I make use of a 32 bit JVM and the DLL "AutoItX3.dll" all works fine. But when I try to run the same tests with "AutoItX3_x64.dll" and a 64 bit JVM nothing seems to work.

In the 64 bit environment calling AU3_WinGetHandle() will cause my JVM to crash.

In the 64 bit environment calling AU3_WinExists() will never find any windows.

These two methods work fine when called with a 32 bit JVM and the 32 bit DLL.

That can't be that much clearer...

;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...