Examples of toArray()


Examples of com.sun.jna.platform.win32.LMAccess.GROUP_INFO_2.toArray()

      IntByReference entriesread = new IntByReference();
      IntByReference totalentries = new IntByReference();
      assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetGroupEnum(
          null, 2, bufptr, LMCons.MAX_PREFERRED_LENGTH, entriesread, totalentries, null));     
      GROUP_INFO_2 group = new GROUP_INFO_2(bufptr.getValue());     
      GROUP_INFO_2[] groups = (GROUP_INFO_2[]) group.toArray(entriesread.getValue());
        for (GROUP_INFO_2 grpi : groups) {
          assertTrue(grpi.grpi2_name.length() > 0);
        }
      assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue()));
    }
View Full Code Here

Examples of com.sun.jna.platform.win32.LMAccess.GROUP_USERS_INFO_0.toArray()

                    0, bufptr, LMCons.MAX_PREFERRED_LENGTH, entriesread, totalentries);
            if (rc != LMErr.NERR_Success) {
                throw new Win32Exception(rc);
            }
            GROUP_USERS_INFO_0 lgroup = new GROUP_USERS_INFO_0(bufptr.getValue());     
            GROUP_USERS_INFO_0[] lgroups = (GROUP_USERS_INFO_0[]) lgroup.toArray(entriesread.getValue());
            ArrayList<Group> result = new ArrayList<Group>();
            for (GROUP_USERS_INFO_0 lgpi : lgroups) {
                Group lgp = new Group();
                if (lgpi.grui0_name != null) {
                  lgp.name = lgpi.grui0_name.toString();
View Full Code Here

Examples of com.sun.jna.platform.win32.LMAccess.LOCALGROUP_USERS_INFO_0.toArray()

                    0, 0, bufptr, LMCons.MAX_PREFERRED_LENGTH, entriesread, totalentries);
            if (rc != LMErr.NERR_Success) {
                throw new Win32Exception(rc);
            }
            LOCALGROUP_USERS_INFO_0 lgroup = new LOCALGROUP_USERS_INFO_0(bufptr.getValue());     
            LOCALGROUP_USERS_INFO_0[] lgroups = (LOCALGROUP_USERS_INFO_0[]) lgroup.toArray(entriesread.getValue());
            ArrayList<Group> result = new ArrayList<Group>();
            for (LOCALGROUP_USERS_INFO_0 lgpi : lgroups) {
                LocalGroup lgp = new LocalGroup();
                if (lgpi.lgrui0_name != null) {
                  lgp.name = lgpi.lgrui0_name.toString();
View Full Code Here

Examples of com.sun.jna.platform.win32.LMAccess.USER_INFO_1.toArray()

      IntByReference entriesread = new IntByReference();
      IntByReference totalentries = new IntByReference();
      assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetUserEnum(         
          null, 1, 0, bufptr, LMCons.MAX_PREFERRED_LENGTH, entriesread, totalentries, null));     
      USER_INFO_1 userinfo = new USER_INFO_1(bufptr.getValue());     
      USER_INFO_1[] userinfos = (USER_INFO_1[]) userinfo.toArray(entriesread.getValue());
        for (USER_INFO_1 ui : userinfos) {
          assertTrue(ui.usri1_name.length() > 0);
        }
      assertEquals(LMErr.NERR_Success, Netapi32.INSTANCE.NetApiBufferFree(bufptr.getValue()));
    }   
View Full Code Here

Examples of com.sun.jna.platform.win32.Sspi.PSecPkgInfo.toArray()

      PSecPkgInfo pPackageInfo = new PSecPkgInfo();
      int rc = Secur32.INSTANCE.EnumerateSecurityPackages(pcPackages, pPackageInfo);
      if(W32Errors.SEC_E_OK != rc) {
        throw new Win32Exception(rc);
      }
      SecPkgInfo[] packagesInfo = pPackageInfo.toArray(pcPackages.getValue());
      ArrayList<SecurityPackage> packages = new ArrayList<SecurityPackage>(pcPackages.getValue());
      for(SecPkgInfo packageInfo : packagesInfo) {
        SecurityPackage securityPackage = new SecurityPackage();
        securityPackage.name = packageInfo.Name.toString();
        securityPackage.comment = packageInfo.Comment.toString();
View Full Code Here

Examples of com.sun.jna.platform.win32.Winspool.JOB_INFO_1.toArray()

            throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
        }

        pJobEnum.read();

        return (JOB_INFO_1[]) pJobEnum.toArray(pcReturned.getValue());
    }

}
View Full Code Here

Examples of com.sun.jna.platform.win32.Winspool.PRINTER_INFO_1.toArray()

            throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
        }

        pPrinterEnum.read();

        return (PRINTER_INFO_1[]) pPrinterEnum.toArray(pcReturned.getValue());
    }

    public static PRINTER_INFO_4[] getPrinterInfo4() {
        IntByReference pcbNeeded = new IntByReference();
        IntByReference pcReturned = new IntByReference();
View Full Code Here

Examples of com.sun.jna.platform.win32.Winspool.PRINTER_INFO_4.toArray()

            throw new Win32Exception(Kernel32.INSTANCE.GetLastError());
        }

        pPrinterEnum.read();

        return (PRINTER_INFO_4[]) pPrinterEnum.toArray(pcReturned.getValue());
    }
}
View Full Code Here

Examples of com.sun.org.apache.bcel.internal.util.ClassVector.toArray()

        clazz = clazz.getSuperClass())
    {
      vec.addElement(clazz);
    }

    return vec.toArray();
  }

  /**
   * Get interfaces directly implemented by this JavaClass.
   */
 
View Full Code Here

Examples of com.sun.xml.internal.messaging.saaj.util.FinalArrayList.toArray()

        }

        if (v.size() == 0)
            return null;

        return (String[])v.toArray(new String[v.size()]);
    }

    /**
     * Set the Content-Language header of this MimeBodyPart. The
     * Content-Language header is defined by RFC 1766.
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.