質問

I have sids of user accounts like this S-1-5-21-4030387420-2927818341-1631038489-1001 I want simple c++ function which will convert this sid to username. if any of you have code for that then plz post

Thank you in advance!!

役に立ちましたか?

解決

LookupAccountSid is your friend - it takes a SID and turns it into a user name. Warning, it can take some time to run.

If you have a text string containing the SID (as in your example above), you can use the ConvertStringSidToSid function to convert the string into a binary blob which can then be read by LookupAccountSid.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top