IsUserAnAdmin function (shlobj_core.h)
[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();
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
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | shlobj_core.h (include Shlobj.h) |
Library | Shell32.lib |
DLL | Shell32.dll (version 5.0 or later) |
API set | ext-ms-win-shell-shell32-l1-2-1 (introduced in Windows 10, version 10.0.10240) |
See also
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για