mirror of
https://github.com/mirror/processhacker
synced 2026-06-08 16:03:24 +00:00
don't throw exception unless really needed in GetAccountName
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@197 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
@@ -1913,7 +1913,10 @@ namespace ProcessHacker
|
||||
domain.EnsureCapacity(domainlen);
|
||||
|
||||
if (LookupAccountSid(0, SID, name, ref namelen, domain, ref domainlen, ref use) == 0)
|
||||
throw new Exception("Could not lookup account SID: " + Win32.GetLastErrorMessage());
|
||||
{
|
||||
if (name.ToString() == "" && domain.ToString() == "")
|
||||
throw new Exception("Could not lookup account SID: " + Win32.GetLastErrorMessage());
|
||||
}
|
||||
}
|
||||
|
||||
if (IncludeDomain)
|
||||
|
||||
Reference in New Issue
Block a user