Package com.sun.jna

Examples of com.sun.jna.NativeLong.longValue()


    }
    class WindowByReference extends ByReference {
        public WindowByReference() { super(XID.SIZE); }
        public Window getValue() {
            NativeLong value = getPointer().getNativeLong(0);
            return value.longValue() == X11.None ? Window.None : new Window(value.longValue());
        }
    }
    class Pixmap extends Drawable {
        private static final long serialVersionUID = 1L;
        public static final Pixmap None = null;
View Full Code Here


    }
    class WindowByReference extends ByReference {
        public WindowByReference() { super(XID.SIZE); }
        public Window getValue() {
            NativeLong value = getPointer().getNativeLong(0);
            return value.longValue() == X11.None ? Window.None : new Window(value.longValue());
        }
    }
    class Pixmap extends Drawable {
        private static final long serialVersionUID = 1L;
        public static final Pixmap None = null;
View Full Code Here

    }
    class WindowByReference extends ByReference {
        public WindowByReference() { super(XID.SIZE); }
        public Window getValue() {
            NativeLong value = getPointer().getNativeLong(0);
            return value.longValue() == X11.None
                ? Window.None : new Window(value.longValue());
        }
    }
    class Pixmap extends Drawable {
    private static final long serialVersionUID = 1L;
View Full Code Here

    class WindowByReference extends ByReference {
        public WindowByReference() { super(XID.SIZE); }
        public Window getValue() {
            NativeLong value = getPointer().getNativeLong(0);
            return value.longValue() == X11.None
                ? Window.None : new Window(value.longValue());
        }
    }
    class Pixmap extends Drawable {
    private static final long serialVersionUID = 1L;
    public static final Pixmap None = null;
View Full Code Here

                public void run() {
                    if(0!=contextId)
                        win32PCSC.SCardReleaseContext(new NativeLong(contextId));
                }
            });
            if (0 != status.longValue()) {
                throw new PcScException(status.intValue());
            }
      contextId = phContext.getValue().longValue();
  }
    }
View Full Code Here

    @Override
    public List<GenericTerminal> list() throws ScardException {
        ShortByReference requiredSize = new ShortByReference();
        NativeLong status = win32PCSC.SCardListReadersW(new NativeLong(contextId), null, null, requiredSize);
        List<GenericTerminal> terminalsList;
        if (SCARD_E_NO_READERS_AVAILABLE == status.longValue()) {
            terminalsList = new ArrayList<GenericTerminal>(0);
            return Collections.unmodifiableList(terminalsList);
        }
        if (SCARD_S_SUCCESS != status.longValue()) {
            throw new PcScException(status.intValue());
View Full Code Here

        List<GenericTerminal> terminalsList;
        if (SCARD_E_NO_READERS_AVAILABLE == status.longValue()) {
            terminalsList = new ArrayList<GenericTerminal>(0);
            return Collections.unmodifiableList(terminalsList);
        }
        if (SCARD_S_SUCCESS != status.longValue()) {
            throw new PcScException(status.intValue());
        }
        short nativeOut[] = new short[requiredSize.getValue()];
        status = win32PCSC.SCardListReadersW(new NativeLong(contextId), null, nativeOut, requiredSize);
        if (SCARD_S_SUCCESS != status.longValue()) {
View Full Code Here

        if (SCARD_S_SUCCESS != status.longValue()) {
            throw new PcScException(status.intValue());
        }
        short nativeOut[] = new short[requiredSize.getValue()];
        status = win32PCSC.SCardListReadersW(new NativeLong(contextId), null, nativeOut, requiredSize);
        if (SCARD_S_SUCCESS != status.longValue()) {
            throw new PcScException(status.intValue());
        }
        String[] readerNames=AStringUtilities.shortsToStrings(nativeOut);
        terminalsList = new ArrayList<GenericTerminal>(readerNames.length);
View Full Code Here

        NativeLongByReference phCard = new NativeLongByReference();
        IntByReference pdwActiveProtocol = new IntByReference();
        NativeLong status = win32PCSC.SCardConnectW(new NativeLong(contextId), new WString(readerName), shareMode, preferredProtocols,
                phCard,
                pdwActiveProtocol);
        if (SCARD_S_SUCCESS != status.longValue()) {
            throw new PcScException(status.intValue());
        }
        return phCard.getValue().longValue();
    }
View Full Code Here

        NativeLongByReference phCard = new NativeLongByReference();
        IntByReference pdwActiveProtocol = new IntByReference();
        NativeLong status = win32PCSC.SCardReconnect(new NativeLong(cardId), shareMode, preferredProtocols,
                activationPolicy,
                pdwActiveProtocol);
        if (SCARD_S_SUCCESS != status.longValue()) {
            throw new PcScException(status.intValue());
        }
        return phCard.getValue().longValue();
    }
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.