WindowsAccountType 열거형

정의

사용되는 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
상속
WindowsAccountType
특성

필드

Anonymous 3

익명 계정입니다.

Guest 1

Windows 게스트 계정입니다.

Normal 0

표준 사용자 계정입니다.

System 2

Windows 시스템 계정입니다.

예제

다음 예제에서는 생성자를 사용 하 여 WindowsIdentity 지정 된 Windows 계정 토큰, 지정 된 인증 유형 및 지정 된 Windows 계정 유형으로 표시 되는 사용자에 대 한 클래스의 새 인스턴스 WindowsIdentity 를 만드는 방법을 보여 있습니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 WindowsIdentity 클래스입니다.

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

설명

WindowsAccountType 열거형은 WindowsIdentity 클래스에서 사용됩니다.

적용 대상