4 messages in net.java.dev.jna.usersRe: [jna-users] Troubles with swing a...
FromSent OnAttachments
jean-michel TApr 29, 2008 12:17 pm 
Timothy WallApr 29, 2008 12:30 pm 
jean-michel TApr 29, 2008 12:53 pm 
jean-michel TApr 30, 2008 5:15 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] Troubles with swing applications?Actions...
From:Timothy Wall (twal@dev.java.net)
Date:Apr 29, 2008 12:30:13 pm
List:net.java.dev.jna.users

Are the two modules using the same version of JNA?

You can check the version of jna.jar by doing

java -jar jna.jar

On Apr 29, 2008, at 3:18 PM, jean-michel T wrote:

Hello.

I have something really strange happening with a dll. I use it to connect to a smart card prototype and unlock it with a function called :

authenticate_user

The method returns 0 in case of succes and 10 if an authentication failed (for any reason I guess).

Now here is what is really strange.

First I created a project which uses JNA, loads the dll, initialize it (another method from the api) and then tries to connect to the card. It works really well, i get a 0 as a return and can see ma card unlocked.

Next step was to create a swing application where i could enter my unlock code. It's part of another bigger application and uses JNA to have round shaped gui ' s. There with the exactly same code I have a 10 as a return for my function.

I did many tests and I thik this problem only happens when i start using the swing frames, as if I call my method just before it keeps working well.

Another point is that if i use a really simple gui (created with matisse on netbeans) and which does'nt use jna, it seems that i don't have the same problem.

I wonder if :

1) Using jna for the gui and to call my lib at the same time could cause some trouble in the data i send to my card?

2)There are some known problems of that type in making jna work with a swing application.

By advance, thank you for your answers.

Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. Téléchargez la version beta.