Hal Kaplan wrote:
=> -----Original Message-----
=> From: [EMAIL PROTECTED] => [mailto:[EMAIL PROTECTED] On Behalf Of Paul Newton
=> Sent: Saturday, September 30, 2006 15:05
=> To: ProFox
=> Subject: SID by SID <g>
snipped
=> What I want to do now is the reverse/converse ie ? => SIDStringToName("S-1-5-21-57989841-1801674531-839522115-1000"
=> ) should return "Paul Newton"
=> => In order to do this I know I will need, amongst others, the following
=> functions:
=> => LookupAccountSid IN advapi32
=> ConvertStringSidToSid IN advapi32
=> => I will probably need some other functions as well and at => this point I am stuck. News2News does not have an entry for => ConvertStringSidToSid and while it has has an entry for => LookupAccountSid I am not able to get to the accompanying => code examples of its use. => => Any help would be much appreciated - and of course, if => anybody thinks that these functions might be useful, I'm => willing to out them on Ed's download page. =>
The only use for this IMHO would be to identify Users in the Registry and 
occasionally a user who cannot be identified because of a network problem.  
Unfortunately the best way would be the reverse (SID=>PlainLanguage) and you 
are having trouble with it.

What are you going to use it for, Paul?
I am just playing around with SIDs, user names, and subkeys of HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList.

I _can_ do this indirectly with WMI (Win32_UserAccount class) but I wanted a more direct approach using API calls. The subkeys of HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList. are of the form

S-1-5-21-57989841-1801674531-839522115-1000

and I wanted to be able to translate them to user names ....







_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to