문제

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