WindowsAccountType WindowsAccountType WindowsAccountType WindowsAccountType Enum

Definizione

Specifica il tipo di account Windows utilizzato.Specifies the type of Windows account used.

public enum class WindowsAccountType
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public enum WindowsAccountType
type WindowsAccountType = 
Public Enum WindowsAccountType
Ereditarietà
WindowsAccountTypeWindowsAccountTypeWindowsAccountTypeWindowsAccountType
Attributi

Campi

Anonymous Anonymous Anonymous Anonymous 3

Account anonimo.An anonymous account.

Guest Guest Guest Guest 1

Account guest di Windows.A Windows guest account.

Normal Normal Normal Normal 0

Account utente standard.A standard user account.

System System System System 2

Account di sistema Windows.A Windows system account.

Esempi

Nell'esempio seguente viene illustrato come utilizzare il WindowsIdentity costruttore per creare una nuova istanza WindowsIdentity della classe per l'utente rappresentato dal token di account Windows specificato, dal tipo di autenticazione specificato e dal tipo di account Windows specificato.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. Questo esempio di codice fa parte di un esempio più ampio fornito WindowsIdentity per la classe.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

Commenti

L'enumerazione WindowsAccountType viene utilizzata dalla classe WindowsIdentity.The WindowsAccountType enumeration is used by the WindowsIdentity class.

Si applica a