1 message in net.java.dev.jna.usersRe: [jna-users] RE : Re: [jna-users] ...
FromSent OnAttachments
Timothy WallApr 30, 2008 7:06 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] RE : Re: [jna-users] Troubles with swing applications?Actions...
From:Timothy Wall (twal@dev.java.net)
Date:Apr 30, 2008 7:06:58 am
List:net.java.dev.jna.users

On Apr 30, 2008, at 8:15 AM, jean-michel T wrote:

I achieved to reproduce my error on a sandbox. I have then in my code:

libWrapper = LibCommWrapper.INSTANCE libWrapper.initialize_dll(); new LoginFrame().displayView(); int value = libWrapper.authenticateUser_dll(new String(password).getBytes());

Does it make a difference if you swap the last two lines (i.e. do your authenticate first)?

The LoginFrame class is a simple frame that does'nt do anything but uses the class WindowsUtils (in the jar jna-examples) to create round borders with the method :

WindowUtils.setWindowMask(this, getArea(getSize()));

If i run this code i get the authentication error with an int having value of 10 as a result (while the initialization was ok).

If i run this following almost same version which does not call the frame using JNA

libWrapper = LibCommWrapper.INSTANCE // libWrapper.initialize_dll(); new LoginFrame().displayView(); int value = libWrapper.authenticateUser_dll(new String(password).getBytes());

.. then it appears that the authentication succeeds and I got a 0 as an answer.

You've commented out initialize_dll(). Is that significant? What does it do?