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

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -