package JNative; import org.xvolks.jnative.JNative; 
import org.xvolks.jnative.Type; 
import org.xvolks.jnative.exceptions.NativeException; 
import org.xvolks.jnative.pointers.Pointer; 
import org.xvolks.jnative.pointers.memory.MemoryBlockFactory; public class PemnParam { 
    /** 
* @param args 
* @throws IllegalAccessException 
* @throws NativeException 
* @throws InterruptedException 
*/ 
public static void main(String[] args) { 
try{ 
  System.loadLibrary("bmcdll");//InterfaceFun是dll文件 
  //参数说明InterfaceFun dll名,AddZhiYe函数名 
  JNative jnative = new JNative("bmcdll","GetParamObj"); 
  //设置此函数的返回值 
  jnative.setRetVal(Type.PSTRUCT); 
  //赋予参数值 
  int i=0; 
  jnative.setParameter(i++, Type.STRING,"agent");//主机名或IP 
  jnative.setParameter(i++, Type.INT, "3181");//端口 
  jnative.setParameter(i++, Type.STRING,"administrator");//用户名 
  jnative.setParameter(i++, Type.STRING,"admin");//密码 
  
  //函数执行 
  jnative.invoke();   
  Pointer ret= new Pointer(MemoryBlockFactory.createMemoryBlock(16)); 
  String sdll = ret.getAsString(); 
  //打印函数返回值 
  System.out.println("Java调用动态库后打印结构成员 a 的值为:"+sdll); 
  ret.dispose(); 
  jnative.dispose(); }catch(Exception ex){ 
ex.printStackTrace(); 



返回数组应该是    *sResult[512]      ---有10项内容的字符串数组 
但是运行的时候总是报java虚拟机错误.... 
如下: An unexpected error has been detected by java Runtime Ebvironment: 
  EXCEPTION_ACCESS_VIOLATION (0xc0000005) 
  JAVA vm:Java HotSport(TM)Client VM (11.0-b15 mixed mode,sharing windows-x86) 
  problematic frame: 
  C [msvcrt.all+0x36f11] 想各位下侠有谁能帮我解决/..............感激不尽........