Export (0) Print
Expand All
Expand Minimize
5 out of 10 rated this helpful - Rate this topic

IsUserAnAdmin function

[IsUserAnAdmin is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Tests whether the current user is a member of the Administrator's group.

Syntax


BOOL IsUserAnAdmin(void);

Parameters

This function has no parameters.

Return value

Type: BOOL

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.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

End of client support

Windows Vista

End of server support

Windows Server 2008

Header

Shlobj.h

Library

Shell32.lib

DLL

Shell32.dll (version 5.0 or later)

See also

CheckTokenMembership

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.