Coimbras said:
How can I check if a UserGroup has the First Admin Account in it?
What is the First Admin Account?
Assuming for a moment that you know what that is, I think that
NetUserGetGroups() or NetUserGetLocalGroups() will get you the information
that you want. Both of these functions take the name of a server as their
first parameter or NULL for the local computer. If you don't want that, you
can use DsGetDCName() to "translate" the name of a domain to the name of its
domain controller machine.
As for the account, take a look at this link:
http://support.microsoft.com/default.aspx?scid=kb;en-us;q243330
It enumerates well-known SIDs (security identifiers). You can use
LookupAccountSID() to get the user name and the domain corresponding to that
SID which you can pass to the functions above.
Regards,
Will