Aric Stewart aric@codeweavers.com writes:
- {
name_size = domain_size = 0;
(*Names)[i].Use = SidTypeUnknown;
(*Names)[i].DomainIndex = -1;
(*Names)[i].Name.Length = 0;
(*Names)[i].Name.MaximumLength = 0;
(*Names)[i].Name.Buffer = NULL;
LookupAccountSidW(NULL, Sids[i], NULL, &name_size, NULL, &domain_size, &use);
if (GetLastError() != ERROR_NONE_MAPPED)
{
You need to check the function return for failure first, though what you probably want is to check that it succeeded.