api - How can I get the name of the Administrators Group? -


i looking windows 32 api function gets name of administrators group. when answer, please add full example. source code should work windows xp , later.

you can use lookupaccountsid function that:

byte bbuffer[128]; dword dwsize = sizeof(bbuffer); if (createwellknownsid(winbuiltinadministratorssid, null, (psid)bbuffer, &dwsize)) {     wchar_t wchname[128], wchdomain[128];     dword cchname = _countof(wchname), cchdomain = _countof(wchdomain);     sid_name_use use;     if (lookupaccountsid(null, (psid)bbuffer, wchname, &cchname, wchdomain, &cchdomain, &use))     {         // wchdomain contain builtin         // wchname contain administrators     } } 

Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -