CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2000
    Posts
    13

    Smile windows API for finding the privileges of the logged user

    how do i find if the user currently logged on to the syatem is an administaror or power user or normal user.Is the any any WIN32 API for the same

  2. #2
    Join Date
    Apr 2003
    Location
    Hyderabad,India
    Posts
    486

    I too need this.

    yes dear friend i too need help on this.
    but just look into the following function in MSDN which may help you.
    suppose you have a user handle got by logonuser(..)
    or equalent then if you want to check a set of previleges on that user I think you can use this.
    do some work on this and reply me
    you can mail me at

    [email protected]

    BOOL PrivilegeCheck(
    HANDLE ClientToken,
    PPRIVILEGE_SET RequiredPrivileges,
    LPBOOL pfResult
    );

    cheers
    harinath
    Thanks n Regards
    Harinath Reddy
    Learn Hello World Program
    A good scientist is a person with original ideas. A good engineer is a person who makes a design that works with as few original ideas as possible. There are no prima donnas in engineering. - Freeman Dyson

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