Shell32IsUserAnAdmin Method
Determine whether the current user is a member of the Administrator's group.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Shell32.dll", ExactSpelling = true)]
public static bool IsUserAnAdmin()
<DllImportAttribute("Shell32.dll", ExactSpelling := true>]
Public Shared Function IsUserAnAdmin As Boolean
Dim returnValue As Boolean
returnValue = Shell32.IsUserAnAdmin()
public:
[DllImportAttribute(L"Shell32.dll", ExactSpelling = true)]
static bool IsUserAnAdmin()
[<DllImportAttribute("Shell32.dll", ExactSpelling = true)>]
static member IsUserAnAdmin : unit -> bool
No code example is currently available or this language may not be supported.
Return Value
Boolean
The return value is
if the user is a member of the Administrator's group;
otherwise,
.