Package com.sun.jna

Examples of com.sun.jna.Memory


      public PRINTER_INFO_1() {
       
      }
     
      public PRINTER_INFO_1(int size) {
        super(new Memory(size));
      }
View Full Code Here


      public PRINTER_INFO_4() {
       
      }
     
      public PRINTER_INFO_4(int size) {
        super(new Memory(size));
      }
View Full Code Here

     * @param size
     *  Buffer size, eg. MAX_TOKEN_SIZE.
     */
      public SecBuffer(int type, int size) {
        cbBuffer = new NativeLong(size);       
        pvBuffer = new Memory(size);
        BufferType = new NativeLong(type);
        allocateMemory();
      }
View Full Code Here

       * @param token
       *  Existing token.
       */
      public SecBuffer(int type, byte[] token) {
        cbBuffer = new NativeLong(token.length);       
        pvBuffer = new Memory(token.length);
        pvBuffer.write(0, token, 0, token.length);
        BufferType = new NativeLong(type);
        allocateMemory();
      }
View Full Code Here

        int rc = Kernel32.INSTANCE.GetLastError();
       
        // not enough bytes in the buffer, resize
        if (rc == W32Errors.ERROR_INSUFFICIENT_BUFFER) {
          _buffer = new Memory(pnMinNumberOfBytesNeeded.getValue());
         
          if (! Advapi32.INSTANCE.ReadEventLog(_h,
                WinNT.EVENTLOG_SEQUENTIAL_READ | _flags,
                0, _buffer, (int) _buffer.size(), pnBytesRead, pnMinNumberOfBytesNeeded)) {
            throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
View Full Code Here

   
    public SERVICE_STATUS_PROCESS() {
    }
   
    public SERVICE_STATUS_PROCESS(int size) {
      super(new Memory(size));
    }
View Full Code Here

     *  Unicode string.
     */
    public String getString() {
          byte[] data = Buffer.getByteArray(0, Length);
          if (data.length < 2 || data[data.length - 1] != 0) {
            Memory newdata = new Memory(data.length + 2);
            newdata.write(0, data, 0, data.length);
            return newdata.getString(0, true);
          }
          return Buffer.getString(0, true);
    }
View Full Code Here

      useMemory(memory);
      read();
    }

    public DATA_BLOB(byte [] data) {
      pbData = new Memory(data.length);
      pbData.write(0, data, 0, data.length);
      cbData = data.length;
      allocateMemory();
    }
View Full Code Here

    public TOKEN_OWNER() {
      super();
    }
   
    public TOKEN_OWNER(int size) {
      super(new Memory(size));
    }
View Full Code Here

      super();
    }
   
    public PSID(byte[] data) {
      super();
      Memory memory = new Memory(data.length);
      memory.write(0, data, 0, data.length);
      setPointer(memory);
    }
View Full Code Here

TOP

Related Classes of com.sun.jna.Memory

Copyright © 2018 www.massapicom. 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.