WindowsAccountType Sabit listesi

Tanım

Kullanılan Windows hesabının türünü belirtir.

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
Devralma
WindowsAccountType
Öznitelikler

Alanlar

Anonymous 3

Anonim bir hesap.

Guest 1

Bir Windows konuk hesabı.

Normal 0

Standart bir kullanıcı hesabı.

System 2

Bir Windows sistem hesabı.

Örnekler

Aşağıdaki örnekte, belirtilen Windows hesap belirteci, belirtilen kimlik doğrulama türü ve belirtilen Windows hesap türü ile temsil edilen kullanıcı için sınıfının yeni bir örneğini WindowsIdentity oluşturmak için oluşturucunun nasıl kullanılacağı WindowsIdentity gösterilmektedir. Bu kod örneği, sınıfı için WindowsIdentity sağlanan daha büyük bir örneğin parçasıdır.

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

Açıklamalar

WindowsAccountType Numaralandırma sınıfı tarafından WindowsIdentity kullanılır.

Şunlara uygulanır