Click here to Skip to main content
15,913,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I m trying to use smart card reader to read n write data to smart card. I have a dll file from the vendor which is for c++ and they have not used it for Java.
Is it possible to use the same dll for Java using JNI layer?

Please reply...
Posted

 
Share this answer
 
Comments
Anil Kumar 23 17-May-12 8:45am    
Problem is, that dll is for c++ . It does not contain functions that have same syntax required for java implementation.

lets say if i hav to use winscard.dll in java code.. hOW WILL I USE IT.. can u please provide ny sample code for dat.
TorstenH. 17-May-12 10:58am    
That is why you need JNI to use the dll file.

I can not provide code - because I don't know that DLL, have never worked with and do not even know where that thingy belongs too. You will need a description of the DLL to connect to it with the JNI and will have to write the wrapper.

That is what we call software development.
Yes. Of course you have to write a JNI wrapper for the DLL.
 
Share this answer
 
Comments
Anil Kumar 23 17-May-12 8:45am    
Problem is, that dll is for c++ . It does not contain functions that have same syntax required for java implementation.

lets say if i hav to use winscard.dll in java code.. hOW WILL I USE IT.. can u please provide ny sample code for dat.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900