Tests whether the current user is a member of the Administrator's group.
Syntax
BOOL IsUserAnAdmin(VOID);
Return Value
Returns TRUE if the user is a member of the Administrator's group; otherwise, FALSE.
Remarks
This function is a wrapper for CheckTokenMembership. It is recommended to call that function directly to determine Administrator group status rather than calling IsUserAnAdmin.
Note This function is available through Windows Vista. It might be altered or unavailable in subsequent versions of Microsoft Windows.
Function Information
| Minimum DLL Version | shell32.dll version 5.0 or later |
|---|
| Custom Implementation | No |
|---|
| Header | shlobj.h |
|---|
| Import library | shell32.lib |
|---|
| Minimum operating systems |
Windows 2000 |
|---|
See Also