WindowsAccountType Enumeração

Definição

Especifica o tipo de conta do Windows usada.Specifies the type of Windows account used.

public enum class WindowsAccountType
[System.Runtime.InteropServices.ComVisible(true)]
public enum WindowsAccountType
[System.Serializable]
public enum WindowsAccountType
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum WindowsAccountType
type WindowsAccountType = 
Public Enum WindowsAccountType
Herança
WindowsAccountType
Atributos

Campos

Anonymous 3

Uma conta anônima.An anonymous account.

Guest 1

Uma conta de convidado do Windows.A Windows guest account.

Normal 0

Uma conta de usuário padrão.A standard user account.

System 2

Uma conta de sistema do Windows.A Windows system account.

Exemplos

O exemplo a seguir mostra como usar o Construtor WindowsIdentity para criar uma nova instância da classe WindowsIdentity para o usuário representado pelo token de conta do Windows especificado, o tipo de autenticação especificado e o tipo de conta do Windows especificado.The following example shows how to use the WindowsIdentity constructor to create a new instance of the WindowsIdentity class for the user represented by the specified Windows account token, the specified authentication type, and the specified Windows account type. Este exemplo de código faz parte de um exemplo maior fornecido para a classe WindowsIdentity.This code example is part of a larger example provided for the WindowsIdentity class.

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

Comentários

A enumeração WindowsAccountType é usada pela classe WindowsIdentity.The WindowsAccountType enumeration is used by the WindowsIdentity class.

Aplica-se a