Click to See Complete Forum and Search --> : windows API for finding the privileges of the logged user


studmama
April 7th, 2003, 02:38 AM
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

mahanare
April 7th, 2003, 05:28 AM
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

harinath@vandemataram.com

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

cheers
harinath