jnative调用piar_compvalues方法
皮皮 2008-09-08 04:45:52 messageBox =new JNative("piapi32.dll","piar_compvalues");
messageBox.setRetVal(Type.INT);
messageBox.setParameter(0,Type.INT,""+p1.getAsInt(0));
Pointer psc=new Pointer(MemoryBlockFactory.createMemoryBlock(4));
psc.setIntAt(0, ArraySize);
messageBox.setParameter(1,Type.INT,""+psc);
log.info("时间:"+timed[0].getAsInt(0));
messageBox.setParameter(2,Type.INT,""+timed[0].getAsInt(0));
messageBox.setParameter(3,Type.FLOAT,""+rvals);
messageBox.setParameter(4,Type.INT,""+istats);
messageBox.setParameter(5,Type.INT,""+0);
messageBox.invoke();
===================================
结果:
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x65623c63, pid=3056, tid=1004
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0-b105 mixed mode, sharing)
# Problematic frame:
# C [piapi32.dll+0x23c63]
#
# An error report file with more information is saved as hs_err_pid3056.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#