Frage

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!!

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top