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