/** * Get the account by SID on the local system. * * @param sid * SID. * @return Account. */ public static Account getAccountBySid(PSID sid) { return getAccountBySid(null, sid); }
/** * Get an account name from a string SID on the local machine. * * @param sidString * SID. * @return Account. */ public static Account getAccountBySid(String sidString) { return getAccountBySid(null, sidString); }
/** * Get an account name from a string SID on the local machine. * * @param sidString * SID. * @return Account. */ public static Account getAccountBySid(String sidString) { return getAccountBySid(null, sidString); }
/** * Get the account by SID on the local system. * * @param sid * SID. * @return Account. */ public static Account getAccountBySid(PSID sid) { return getAccountBySid(null, sid); }
/** * Get an account name from a string SID. * * @param systemName * System name. * @param sidString * SID. * @return Account. */ public static Account getAccountBySid(String systemName, String sidString) { return getAccountBySid(systemName, new PSID(convertStringSidToSid(sidString))); }
/** * Get an account name from a string SID. * * @param systemName * System name. * @param sidString * SID. * @return Account. */ public static Account getAccountBySid(String systemName, String sidString) { return getAccountBySid(systemName, new PSID( convertStringSidToSid(sidString))); }
Account group = null; try { group = Advapi32Util.getAccountBySid(sidAndAttribute.Sid); } catch (Exception e) { group = new Account();
Account group; try { group = Advapi32Util.getAccountBySid(sidAndAttribute.Sid); } catch (Exception e) { group = new Account();
throw new Win32Exception(Kernel32.INSTANCE.GetLastError()); return getAccountBySid(user.User.Sid);
throw new Win32Exception(Kernel32.INSTANCE.GetLastError()); return getAccountBySid(user.User.Sid);