CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Winnt SIDs

  1. #1
    Guest

    Winnt SIDs

    Hello,

    Is it possible to get a groups string name by its SID??!!

    ex:
    SID = 2123456
    GroupName = PokerGroup

    Is this possible?? Please do not answer this post by saying just yes or I will hunt you down and shoot you!



  2. #2
    Guest

    Re: Winnt SIDs

    Hi,

    LookupAccountSid
    The LookupAccountSid function accepts a security identifier (SID) as input. It retrieves the name of the account for this SID and the name of the first domain on which this SID is found.

    BOOL LookupAccountSid(
    LPCTSTR lpSystemName, // name of local or remote computer
    PSID Sid, // security identifier to lookup
    LPTSTR Name, // buffer to receive account name
    LPDWORD cbName, // size of account name buffer
    LPTSTR ReferencedDomainName,
    // buffer to receive name of referenced domain
    LPDWORD cbReferencedDomainName,
    // size domain name buffer
    PSID_NAME_USE peUse // receives type of SID
    );

    You can use the above API call to solve your problem ....

    Hope this helps...
    Feel free to contact me ....
    my mail id is [email protected]

    --pugal


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured