windows - ConvertStringSidToSid for S-1-5 (NT AUTHORITY group) -
i have csid object holding known sid system. calling domain() function can see domain "nt authority".
in msdn found out group's sid "s-1-5", tried use convertstringsidtosid() in order psid group got error sid structure incorrect.
is there way csid group? possible?
thanks lot! :-)
you need use allocateandinitializesid
() function this. see this example in msdn.
psid psid; sid_identifier_authority sidauth = security_nt_authority; if(! allocateandinitializesid( &sidauth, 2, security_builtin_domain_rid, domain_alias_rid_admins, 0, 0, 0, 0, 0, 0, &psid) ) { printf( "allocateandinitializesid error %u\n", getlasterror() ); return false; }
Comments
Post a Comment