WindowsAccountType Enum
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee geeft u het type Windows account gebruikt.
public enum class WindowsAccountType
[System.Serializable]
public enum WindowsAccountType
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum WindowsAccountType
[<System.Serializable>]
type WindowsAccountType =
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type WindowsAccountType =
Public Enum WindowsAccountType
- Overname
- Kenmerken
Velden
| Name | Waarde | Description |
|---|---|---|
| Normal | 0 | Een standaardgebruikersaccount. |
| Guest | 1 | Een Windows gastaccount. |
| System | 2 | Een Windows systeemaccount. |
| Anonymous | 3 | Een anoniem account. |
Voorbeelden
In het volgende voorbeeld ziet u hoe u de WindowsIdentity constructor gebruikt om een nieuw exemplaar van de WindowsIdentity-klasse te maken voor de gebruiker die wordt vertegenwoordigd door het opgegeven Windows-accounttoken, het opgegeven verificatietype en het opgegeven Windows accounttype. Dit codevoorbeeld maakt deel uit van een groter voorbeeld voor de WindowsIdentity klasse.
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
Opmerkingen
De WindowsAccountType opsomming wordt door de WindowsIdentity klasse gebruikt.