Examples of PSecPkgInfo


Examples of com.sun.jna.platform.win32.Sspi.PSecPkgInfo

   * @return
   *  An array of SSPI security packages.
   */
  public static SecurityPackage[] getSecurityPackages() {
      IntByReference pcPackages = new IntByReference();
      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
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.