PC/SC with JNI vs. javax.smartcardio
Hi,
for programming card terminals (USB tag readers) the PC/SC was used with JNI. Since the Java Smartcard I/O API (javax.smartcardio, JSR 268) was introduces in 1.6 it makes the JNI obsolete right?
So there is no need for jpcsc and similar?
Thanks
STeN
Edited by: stenlik on Jun 8, 2011 8:39 PM
smartcardio uses JNI to access the PC/SC layer. It is built into the JDK so you do not have to distribute the JAR/DLL files any more as they are already delivered. jpcsc still has it's place but as you mentioned it is not required any more (unless your JDK does not have smartcardio).
Cheers,
Shane
Similar Messages
-
Problem with APDUCommand in javax.smartcardio
Hi,
There seem to be a bug (from my point of view) with the javax.smartcardio when i attempt to send a command over to the card.
There a code frag
factory = TerminalFactory.getDefault();
try {
terminals = factory.terminals().list();
System.out.println("Terminals: " + terminals);
terminal = terminals.get(1);
System.out.println("Card Present: " + terminal.isCardPresent());
Card card = terminal.connect("*");
channel = card.getBasicChannel();
ResponseAPDU resp = channel.transmit(new CommandAPDU(selectcom));
System.out.println("Select Resp: " + getHexString(resp.getBytes()));
CommandAPDU com = new CommandAPDU((byte)0x43, (byte)0x52, (byte)0x00, (byte)0x00, 0);
System.out.println("CommandAPDU: " + getHexString(com.getBytes()));
resp = channel.transmit(com);
System.out.println("Result: " + getHexString(resp.getBytes()));
card.disconnect(false);
} catch (CardException e) {
e.printStackTrace();
}There the result:
Terminals: [PC/SC terminal OMNIKEY CardMan 5x21 0, PC/SC terminal OMNIKEY CardMan 5x21-CL 0]
Card Present: true
Select Resp: 90 00
CommandAPDU: 43 52 00 00
Result: 6E 00
BUILD SUCCESSFUL (total time: 1 second)
And there the result i tried with another tool (GPShell)
select -AID 53504545454659503101
--> 00A404000A53504545454659503101
<-- 9000
send_apdu -sc 0 -APDU 43520000
Send APDU: 43 52 00 00
--> 43520000
<-- 9000
Recv APDU: 90 00
card_disconnect
release_context
Anyone have encounter the same problem?Refering to this code:
factory = TerminalFactory.getDefault();
try {
terminals = factory.terminals().list();
System.out.println("Terminals: " + terminals);
terminal = terminals.get(1);
System.out.println("Card Present: " + terminal.isCardPresent());
Card card = terminal.connect("*");
channel = card.getBasicChannel();
ResponseAPDU resp = channel.transmit(new CommandAPDU(selectcom));
System.out.println("Select Resp: " + getHexString(resp.getBytes()));
CommandAPDU com = new CommandAPDU((byte)0x43, (byte)0x52, (byte)0x00, (byte)0x00, 0);
System.out.println("CommandAPDU: " + getHexString(com.getBytes()));
resp = channel.transmit(com);
System.out.println("Result: " + getHexString(resp.getBytes()));
card.disconnect(false);
} catch (CardException e) {
e.printStackTrace();
}ResponseAPDU resp = channel.transmit(new CommandAPDU(selectcom));
I already selected the applet here.
With this command here
static byte[] selectcom = new byte[] {(byte)0x00, (byte)0xA4, (byte)0x04, (byte)0x00, (byte)0x0A, (byte)0x53, (byte)0x50, (byte)0x45, (byte)0x45, (byte)0x45, (byte)0x46, (byte)0x59, (byte)0x50, (byte)0x31, (byte)0x01};
So selecting the applet is done. And it return a 90 00. Then i start to send applet specific command.
=) -
Java 6: javax.smartcardio - can't get CPLC
Hello! I have a problem - can't get CPLC with classes from javax.smartcardio (get SW=6a88), but I easily get it with com.sun.javacard.apduio classes from Java Card Kit 2.2.2.
Here the test code for javax.smartcardio :
import java.util.List;
import javax.smartcardio.*;
public class TestSmartCardJSE60
public static void main(String[] args)
try
TerminalFactory tf = TerminalFactory.getInstance("PC/SC", null);
CardTerminals cts = tf.terminals();
List<CardTerminal> avaiableTerminals = cts.list();
CardTerminal ct = avaiableTerminals.get(0);
Card card = ct.connect("*");
try
CardChannel channel = card.getBasicChannel();
CommandAPDU capdu = new CommandAPDU(0x80, 0xCA, 0x9F, 0x7F);
ResponseAPDU res = channel.transmit(capdu);
System.out.printf("%s%n", res);
finally
card.disconnect(true);
catch(Exception e)
e.printStackTrace();
}And here the same for com.sun.javacard.apduio
import com.sun.javacard.apduio.*;
public class TestSmartCardJCK222
public static void main(String[] args)
try
CadClientInterface cad = CadDevice.getPCSCClientInstance(0);
cad.powerUp();
try
Apdu capdu = new Apdu();
capdu.command[Apdu.CLA] = (byte) 0x80;
capdu.command[Apdu.INS] = (byte) 0xCA;
capdu.command[Apdu.P1] = (byte) 0x9F;
capdu.command[Apdu.P2] = 0x7F;
cad.exchangeApdu(capdu);
System.out.printf("%s%n", capdu);
capdu.setLe(0x2D);
cad.exchangeApdu(capdu);
System.out.printf("%s%n", capdu);
finally
cad.powerDown(true);
catch(Exception e)
e.printStackTrace();
}I run both tests under WindowsXP SP3 with ORGA ECO5000 Usb and JCOP21 smart card.
What is my problem? Actualy I want to use javax.smartcardio for my application, because classes from that package more useful than com.sun.javacard.apduio;
Any ideas?You're missing the Le byte, since you're expecting data back. Try it.
-
How to get free memory size of a card with javax.smartcardio
Hi,
How can I find how much memory of a card is free with javax.smartcardio?
Please your advice.
Thank in advance.gizmo wrote:
I wanted to read the free memory size with a card reader and javax.smartcardio.
Is it possible to send a APDU Command to select the root 3F00 and read the properties?There is no built-in smartcardio funationality to do this. What you can do is send an APDU and get the memory by calling the code mentioned already. -
How to get a handle which is used in c dll from javax.smartcardio.card
good afternoon
i am using javax.smartcardio.card to operate a sim-card reader .
but i have a dll which is call sim-card reader by handle.
how can i get a handle from a javax.smartcardio.card object to pass to the dll
next is the code .
c dll prototype declaration
char DoFormat([in] unsigned long P1�C[in] char * P2�C[in] bool P3,[in][out] char *P4)P1 is a handle
java code:
private boolean checkCardReader(boolean isopen)
boolean r=false;
try {
javax.smartcardio.card card;
TerminalFactory factory = TerminalFactory.getDefault();
List terminalList = factory.terminals().list();
terminal = (CardTerminal) terminalList.get(0);
// establish a connection with the card
card = terminal.connect("T=0");
channel = card.getBasicChannel();
//how can i get a handle which can be used by windows dll .
}catch (Exception ex)
System.out.println("Exception : " + ex);
return r;
*****************************************************************Presumably you are calling a C library method that returns a handle.
Normally a handle will be a integer type value.
With such a value you can cast it into a java integer type and then cast it back in different JNI code by passing it to those routines.
A java long is as big as you can get and will hold most every normal type handle item. You should however verify sizes. -
Javax.smartcardio package not found in Java source file
I downloaded the latest JDK from developer.apple.com, but now I cannot find the javax.smartcardio package in the source package (src.jar) that came with it. I unpacked the JAR file, but simply can't find the stated package. Can you help me out?
I can confirm the issue here (Mountain Lion, 10.8.5). A very simple program (attached below) that just enumerates terminals and checks if a card is present will crash:
If Apple JDK6 is used in 64-bit mode (without supplying the -d32 argument)
If Oracle JDK7 is used (can not switch to 64-bit, uses)
It will work if:
If Apple JDK6 is forced into 32-bit mode using -d32
If Oracle JDK7 version of libj2pcsc.dylib is replaced with a patched version
javax.smartcardio on Mac OS X is in a truly sad state. :-(
Can anyone suggest alternatives for Smartcard communication on Mac OS X fat clients?
package com.example.smartcardio;
import javax.smartcardio.CardTerminal;
import javax.smartcardio.CardTerminals;
import javax.smartcardio.TerminalFactory;
public class TestWaitForChanges {
public static void main(String[] args) throws Exception {
CardTerminals terminals = TerminalFactory.getDefault().terminals();
while (true) {
for (CardTerminal terminal : terminals.list()) {
System.out.println("Checking terminal: " + terminal.getName());
System.out.println("Card present: " + (terminal.isCardPresent() ? "YES" : "NO"));
System.out.println("Waiting for changes...");
terminals.waitForChange(); -
Help me - I have a problem of using the javax.smartcardio
Hi everybody!!!
I'm creating an application to communicate with javacard.
I searched on internet and know about javax.smartcardio.
But I can not use it, even it's inside the default library of Java 6.
I already import the javax.smartcardio.*; to my java file.
But it can not find the class inside this package.
Can somebody help me? Thanks a lot.Hi everybody.
I got the advice from Mr. Safarmer on this forum.
So:
If you're using Eclipse to develop the application.
You have to set the JRE Library to Alternate JRE.
Below is the instruction for dummies like me ^^:
Go to Build Path > Configure Buil Path of your project
In Libraries tab, Edit the JRE System Library
Instead of choosing the Execution Environment, we choose Alternate JRE (usually jre6)--> This is my case. And i did it. -
Problem with JNI and Parallel Port dll
Hi. I'm doing some testes with JNI. Firs i followed the netbeans tutorial for doing a C programa that prints somthing for java.. like.. "Hello java from C".
So i tried to load a dll from my dll. Like, I have this dll to use the parallel port on windows Xp. So i created a dll to access it an comunicates eoth java.
I did everything just fine.
When I start my Java app, the first thing it does is to load this parallel port dll and configure the functions of it.
After that .. I get this error
EXCEPTION_FLT_STACK_CHECK (0xc0000092) at pc=0x0093d269, pid=2284, tid=3000
Can someone explain why ?
(Sorry if i wasn't clear enough, english is not my native language, so ask if you don't understand something.. )hi ,
I met the same problem this morning, and searched the www.google.com in order to solve it, as a result, your article was shown on my screen. :)
Till now I have read some technical information and solved my problems. Maybe the solution be useful to you:
==============================
error message : (Environment : Tomcat 5, Windows 2003, Mysql5)
2006-3-29 11:53:48 org.apache.catalina.core.StandardWrapper unload
message: Waiting for 2 instance(s) to be deallocated
==============================
cause: the number of connection to database exceeded.another word,too many connections.
==============================
solution: close the connection when it becomes useless for your program. :)
==============================
ps. Sorry for my weak English . hehe .... -
i have to implement a few standard APIs. As a part of the implementation I have to provide references to an object I create. Now my underlying code is C++ with JNI used to throw the Java APIs. Problem is JNI now returns different references for the same object and hence my prupose id defeated. Could anyone suggest how this problem can be overcome.
I tried to figure out what your problem is, but can't. Please rephrase it and give a bit more detail on what you are doing and what is going wrong.
-
i have to implement a few standard APIs. As a part of the implementation I have to provide references to an object I create. Now my underlying code is C++ with JNI used to throw the Java APIs. Problem is JNI now returns different references for the same object and hence my prupose id defeated. Could anyone suggest how this problem can be overcome.
I'm not exactly sure what you're talking about, but it sounds like you may need to look into global references. Look at NewGlobalRef() and DeleteGlobalRef() and see if those help you out.
God bless,
-Toby Reyelts
For all your JNI woes, check out Jace - http://jace.reyelts.com/jace -
Problem with JNI form C++
Hi all,
I'm fairly new to programming with JNI, so please excuse me if I ask a dumb question.
I'm trying to call a Java method from a C++ class, but when I run the program, it throws an error, crashing the program. I'm pretty sure the problem is that the call to env->getMethodID() is throwing an error. I have looked around to try and find a way call a function with no arguments, but all of the examples that I have found all call a Java main.
I'll post my code and the error message below so that things are a bit clearer.
Thanks,
Robert.
Here is the main.cpp. This is where the program is started.
#include "/usr/lib/jvm/java-6-sun-1.6.0.06/include/jni.h"
int main()
JNIEnv *env;
JavaVM *jvm;
jint res;
jclass cls;
jmethodID mid;
// creation of the JVM
JavaVMInitArgs vm_args;
JavaVMOption options[1];
options[0].optionString = "-Djava.class.path= .";
vm_args.version = 0x00010002;
vm_args.options = options;
vm_args.nOptions = 1;
vm_args.ignoreUnrecognized = JNI_TRUE;
res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
// now the rest of the code can work
cls = env->FindClass("Test");
mid = env->GetMethodID(cls, "run", "()V");
env->CallVoidMethod(cls, mid);
jvm->DestroyJavaVM();
}Here is Test.java
public class Test
public void run()
System.out.println("stuff");
foo();
public void foo()
System.out.println("asdfasdf");
}And here is the error message.
# An unexpected error has been detected by Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x06245f7d, pid=9054, tid=1076641792
# Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode, sharing linux-x86)
# Problematic frame:
# V [libjvm.so+0x245f7d]
# An error report file with more information is saved as:
# /media/MY STICK/jni/cpp/hs_err_pid9054.log
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
AbortedEdited by: metaldrummer610 on Apr 23, 2008 8:35 PMYeah, so I just figured out what was wrong. I wasn't calling main from in Java. My bad guys.
-
MS SQL Server problem with MDB's: javax.transaction.xa.XAException
I am programming agents in j2ee and using MDB to implement the asynchronicity of
the agents.
Those MDB's get messages (MapMessage) from a controller (an SFSB) that contain
the agent's ID and the action that the agent has to perform. The MDB creates a
SFSB, and calls the appropriate action from this session bean. Those actions require
to read and write from my MS SQL Server 2000 XA database. But when running my
program, I often get this error, which doesn't seem to affect the action, because
when I check my database data, everything is updated correctly. So the program
still completes, but the errors slow down the execution (the program hangs for
about 3 seconds, each time the error occurs).
Does anybody has an explanation or solution for this?
Thank you...
This is the error output:
onMessage()
Reading MapMessage: 1
<26-apr-2004 14.34 u. CEST> <Error> <EJB> <BEA-010026> <Exception occurred during
commit of transaction Xid=BEA1-005F88135FFBA636FFF7(15619088),Status=Rolled back.
[Reason=javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=4,seconds
left=30,XAServerResourceInfo[JMS_JMS Server2_NotDurable]=(ServerResourceInfo[JMS_JMS
Server2_NotDurable]=(state=rolledback,assigned=lucille3_ms),xar=JMS_JMS Server2_NotDurable),XAServerResourceInfo[MSSQL
Connection Pool]=(ServerResourceInfo[MSSQL Connection Pool]=(state=rolledback,assigned=lucille3_ms),xar=MSSQL
Connection Pool),SCInfo[cluster+lucille3_ms]=(state=rolledback),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+,
XAResources={},NonXAResources={})],CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+):
javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0)returns -4
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown
Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.prepare(Unknown Source)
at weblogic.jdbcx.base.BaseXAResource.prepare(Unknown Source)
at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:821)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'MSSQL Connection
Pool
[BEA][SQLServer JDBC Driver][SQLServer]xa_prepare (0) returns -4 - with nested
exception:
[javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).>
I am programming agents in j2ee and using MDB to implement the asynchronicity of
the agents.
Those MDB's get messages (MapMessage) from a controller (an SFSB) that contain
the agent's ID and the action that the agent has to perform. The MDB creates a
SFSB, and calls the appropriate action from this session bean. Those actions require
to read and write from my MS SQL Server 2000 XA database. But when running my
program, I often get this error, which doesn't seem to affect the action, because
when I check my database data, everything is updated correctly. So the program
still completes, but the errors slow down the execution (the program hangs for
about 3 seconds, each time the error occurs).
Does anybody has an explanation or solution for this?
Thank you...
This is the error output:
onMessage()
Reading MapMessage: 1
<26-apr-2004 14.34 u. CEST> <Error> <EJB> <BEA-010026> <Exception occurred during
commit of transaction Xid=BEA1-005F88135FFBA636FFF7(15619088),Status=Rolled back.
[Reason=javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=4,seconds
left=30,XAServerResourceInfo[JMS_JMS Server2_NotDurable]=(ServerResourceInfo[JMS_JMS
Server2_NotDurable]=(state=rolledback,assigned=lucille3_ms),xar=JMS_JMS Server2_NotDurable),XAServerResourceInfo[MSSQL
Connection Pool]=(ServerResourceInfo[MSSQL Connection Pool]=(state=rolledback,assigned=lucille3_ms),xar=MSSQL
Connection Pool),SCInfo[cluster+lucille3_ms]=(state=rolledback),local properties=({}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+,
XAResources={},NonXAResources={})],CoordinatorURL=lucille3_ms+127.0.0.1:8001+cluster+t3+):
javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0)returns -4
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.executeXaRpc(Unknown
Source)
at weblogic.jdbcx.sqlserver.SQLServerImplXAResource.prepare(Unknown Source)
at weblogic.jdbcx.base.BaseXAResource.prepare(Unknown Source)
at weblogic.jdbc.jta.DataSource.prepare(DataSource.java:821)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:1161)
at weblogic.transaction.internal.XAServerResourceInfo.prepare(XAServerResourceInfo.java:395)
at weblogic.transaction.internal.ServerSCInfo$1.execute(ServerSCInfo.java:253)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Could not prepare resource 'MSSQL Connection
Pool
[BEA][SQLServer JDBC Driver][SQLServer]xa_prepare (0) returns -4 - with nested
exception:
[javax.transaction.xa.XAException: [BEA][SQLServer JDBC Driver][SQLServer]xa_prepare
(0) returns -4]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1644)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:300)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
at weblogic.ejb20.internal.MDListener.execute(MDListener.java:412)
at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:316)
at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:281)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).>
-
Opening a new JFrame in a specific DISPLAY on X11 environment with JNI
Hi,
I have a problem that I'm unable to solve.
I have a Java Application (on Linux with X11 XServer display manager ) running in background that has to open, once received the request, JFrames on the client display. So if I launch the client from "display1", I have to open a JFrame on display1 and then if I launch again the client from "display2", I have to open a JFrame on display2.
But I found no way do specify where (on which display) I want to open my frame.
I saw there is a JFrame constructor using GraphicsConfiguration but it I can access only to Local GraphicsConfiguration, so I didn't understand the meaning of this parameter. ;-)
I tryed even to change runtime the value of $DISPLAY environment variable just before the "new" call but it seems that awt connect to XServer only the first time I use a "graphic call" using correctly my $DISPLAY changed value.
So all my frames appear on the display from which the first client connects.
There is a way to tell awt to open a window on a specific DISPLAY without JNI ?
Or, with JNI it's possible to override, in the X11DrawingSurfaceInfo structure, the field "display" (opening a new connection when necessary) for specific JFrame and the return the changed value to the AWT engine ?
Thanks to allHi,
Have you had any further luck with this? I'd like to do something very similar to this (read from a config file the XServer address and use it at runtime to display on that particular server - I have multiple displays with different addresses).
The best I can figure so far is to use ProcessBuilder and launch another java process with the $DISPLAY env variable set (differently for each process - or client display in your case).
Whilst I may be able to get away with this for my project, it has many many disadvantages and I'd like to be able to change this programmatically/on-the-fly.
Anyone's help would be greatly appreciated.
I may just have to scrap using Java.. -
Help need in javax.smartcardio.exception
getting error
javax.smartcardio.CardException: sun.security.smartcardio.PCSCException: Unknown error 0xc000002b
at sun.security.smartcardio.ChannelImpl.doTransmit(ChannelImpl.java:202)
at sun.security.smartcardio.ChannelImpl.transmit(ChannelImpl.java:73)
while setting pin limit in the card.
Please help what is the cause of getting this error.
thanks in advanceFirst you should check that the library has the checkbox 'Deploy by default' is checked for your library.
The you open the project properties of the view controller project, select Deployments, edit the deployment descriptor. Select the Node 'File Groups'->'WEB-INF/lib'->'Contributors'. this should give you a list of libraries your project uses. Check if your library has the checkbox checked (is selected fro deployment). If it's not checked, set it.
This should include the library.
Timo -
How can I get the time in Microsecond with JNI ?
How can I get the time in Microsecond with JNI ?
JNIEXPORT jdouble JNICALL Java_Win32Native_queryPerformanceFrequency (JNIEnv *env, jobject obj) {
LARGE_INTEGER lFrequency;
::QueryPerformanceFrequency(&lFrequency);
return (jdouble)lFrequency.QuadPart;
JNIEXPORT jdouble JNICALL Java_Win32Native_queryPerformanceCounter (JNIEnv *env, jobject obj) {
LARGE_INTEGER lpCounter;
::QueryPerformanceCounter(&lpCounter);
return (jdouble)lpCounter.QuadPart;
Maybe you are looking for
-
Apple id cannot be used in itunes store
I cannot sign into itunes on my computer nor can i authorize my computer
-
No work item exist in sxmb_moni_bpe
Hi experts, iam working with a senario using BPM iam not able to execute my senario plz help me in this case. Senario details. /people/arpit.seth/blog/2005/06/27/rfc-scenario-using-bpm--starter-kit check above link i have done same senario.when iam e
-
Change position of print output format item
I have a tabular form that has the report printing feature enabled. It display the 'Print' link on the bottom of the form. I created an item to let the user user choose the report output. How can I get the item to display next to the 'print' link?
-
I am not able to open any PDF documents, what I just see is blank screen in new tab.
I am not able to open any PDF link in Firefox(I downloaded and installed latest version) but able to open easily in other browsers.
-
Wanted conversion of character from uppercase to lowercase.
Hi all, I am useing one function to conver amount numbers to character conversion. but they r comming in upper case. but i want in lower case. and also i want to remove "rupees " word at the end of the wording. for example. Rs.123 /- output is: ONE H