Jump to content

Featured Replies

Posted

I’m writing an application on Windows XP which gives the SID of user.

With the valid Token Handle, when I call GetTokenInfomation API with TokenUser as a second parameter then every time & for all user account I get Valid SID in PTOKEN_USER structure variable.

Valid Sid => Sid is S-1-5-21-1121170692-2157880286-4158546613-1000

Here RID is => 1000

But when I use NetQueryDisplayInformation API with NET_DISPLAY_USER as a information level (second parameter) then I get NET_DISPLAY_USER structure as a out Parameter.

User123 is my one account which has the administrative rights.

With the help of NET_DISPLAY_USER structure when I call to LookupAccountName API with variable of NET_DISPLAY_USER.usri1_name as a name of the user account then for a User123 account I get SID without RID.

e.g.

Like this => Sid is S-1-5-21-1121170692-2157880286-4158546613

For other account with same procedure gives me the correct SID i.e. SID with RID

e.g.

Valid Sid => Sid is S-1-5-21-1121170692-2157880286-4158546613-1000

Please provide me any pointers for returning SID without RID in second case.

Thanks in Advance

WindowsForum

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...