Package com.sun.jna

Examples of com.sun.jna.Function.invoke()


        Pointer vptr = this.getPointer().getPointer(0);
        // we take the vtable id and multiply with the pointer size (4 bytes on
        // 32bit OS)
        Function func = Function.getFunction(vptr.getPointer(vtableId
                * Pointer.SIZE));
        return func.invoke(returnType, args);
    }
   
    protected void _invokeNativeVoid(int vtableId, Object[] args) {
        Pointer vptr = this.getPointer().getPointer(0);
        // we take the vtable id and multiply with the pointer size (4 bytes on
View Full Code Here


        if (fncEnumGpusNV == null) return 0;

        // enumerate nVidia adapters
        HGLRCByReference hGPU = new HGLRCByReference();
        for (int i = 0; i < 16; i++) {
            Boolean ok = (Boolean) fncEnumGpusNV.invoke(Boolean.class, new Object[] { Integer.valueOf(i), hGPU, });
            if (!ok.booleanValue()) return i;
        }

        return 0;
    }
View Full Code Here

        if (fncEnumGpusNV == null) return 0;

        // enumerate nVidia adapters
        HGLRCByReference hGPU = new HGLRCByReference();
        for (int i = 0; i < 16; i++) {
            Boolean ok = (Boolean) fncEnumGpusNV.invoke(Boolean.class, new Object[] { Integer.valueOf(i), hGPU, });
            if (!ok.booleanValue()) return i;
        }

        return 0;
    }
View Full Code Here

               
                   
                   
            }
           
            Object retVal = func.invoke(retType, args);
           
            if ( !void.class.equals(retType)){
                // We need to set the return value.
               
                if ( retVal == null ){
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.