WindowsAccountType Wyliczenie

Definicja

Określa typ używanego konta systemu Windows.

public enum class WindowsAccountType
[System.Runtime.InteropServices.ComVisible(true)]
public enum WindowsAccountType
public enum WindowsAccountType
[System.Serializable]
public enum WindowsAccountType
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum WindowsAccountType
[<System.Runtime.InteropServices.ComVisible(true)>]
type WindowsAccountType = 
type WindowsAccountType = 
[<System.Serializable>]
type WindowsAccountType = 
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type WindowsAccountType = 
Public Enum WindowsAccountType
Dziedziczenie
WindowsAccountType
Atrybuty

Pola

Anonymous 3

Konto anonimowe.

Guest 1

Konto gościa systemu Windows.

Normal 0

Konto użytkownika standardowego.

System 2

Konto systemowe systemu Windows.

Przykłady

W poniższym przykładzie pokazano, jak za pomocą WindowsIdentity konstruktora utworzyć nowe wystąpienie WindowsIdentity klasy dla użytkownika reprezentowanego przez określony token konta systemu Windows, określony typ uwierzytelniania i określony typ konta systemu Windows. Ten przykład kodu jest częścią większego przykładu podanego WindowsIdentity dla klasy.

void IntPtrStringTypeConstructor( IntPtr logonToken )
{
   
   // Construct a WindowsIdentity object using the input account token,
   // and the specified authentication type and Windows account type.
   String^ authenticationType = "WindowsAuthentication";
   WindowsAccountType guestAccount = WindowsAccountType::Guest;
   WindowsIdentity^ windowsIdentity = gcnew WindowsIdentity( logonToken,authenticationType,guestAccount );
   
   Console::WriteLine( "Created a Windows identity object named {0}.", windowsIdentity->Name );
}
private static void IntPtrStringTypeConstructor(IntPtr logonToken)
{
    // Construct a WindowsIdentity object using the input account token,
    // and the specified authentication type, and Windows account type.
    string authenticationType = "WindowsAuthentication";
    WindowsAccountType guestAccount = WindowsAccountType.Guest;
    WindowsIdentity windowsIdentity =
        new WindowsIdentity(logonToken, authenticationType, guestAccount);

    Console.WriteLine("Created a Windows identity object named " +
        windowsIdentity.Name + ".");
}
Private Sub IntPtrStringTypeConstructor(ByVal logonToken As IntPtr)
    ' Construct a WindowsIdentity object using the input account token,
    ' and the specified authentication type and Windows account type.
    Dim authenticationType As String = "WindowsAuthentication"
    Dim guestAccount As WindowsAccountType = WindowsAccountType.Guest
    Dim windowsIdentity As _
        New WindowsIdentity(logonToken, authenticationType, guestAccount)

    WriteLine("Created a Windows identity object named " + _
        windowsIdentity.Name + ".")
End Sub

Uwagi

Wyliczenie WindowsAccountType jest używane przez klasę WindowsIdentity .

Dotyczy