I need to be able to get the user's SID (session id) in string form, for example: S-1-5-5-0-687862401.
I need to access registry info under:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\SessionDefaultDevices\
I'm trying to use the API function LookupAccountName but having no luck. My thinking was to follow that by a call to ConvertSidToStringSid.