DirectoryEntry.NativeGuid Egenskap
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Hämtar GUID för DirectoryEntry, som returneras från providern.
public:
property System::String ^ NativeGuid { System::String ^ get(); };
[System.ComponentModel.Browsable(false)]
[System.DirectoryServices.DSDescription("DSNativeGuid")]
public string NativeGuid { get; }
[<System.ComponentModel.Browsable(false)>]
[<System.DirectoryServices.DSDescription("DSNativeGuid")>]
member this.NativeGuid : string
Public ReadOnly Property NativeGuid As String
Egenskapsvärde
En Guid struktur som representerar GUID för DirectoryEntry, som returneras från providern.
- Attribut
Exempel
I följande exempel visas klassens Guid egenskaper DirectoryEntry och NativeGuid . Det här exemplet hämtar den angivna DirectoryEntry användaren och visar dess Guid egenskaper och NativeGuid egenskaper.
Dim myADSPath As [String] = "LDAP://onecity/CN=Users,
DC=onecity,DC=corp,DC=fabrikam,DC=com"
Dim myDirectoryEntry As New DirectoryEntry(myADSPath)
' Display the Guid and NativeGuid.
Console.WriteLine("The GUID of the ADS object:" + myDirectoryEntry.Guid.ToString)
Console.WriteLine("The Native GUID of the ADS" + "object:" +
myDirectoryEntry.NativeGuid)
String myADSPath = "LDAP://onecity/CN=Users,
DC=onecity,DC=corp,DC=fabrikam,DC=com";
DirectoryEntry myDirectoryEntry=new DirectoryEntry(myADSPath);
// Display the Guid and NativeGuid.
Console.WriteLine("The GUID of the ADS object:"+
myDirectoryEntry.Guid);
Console.WriteLine("The Native GUID of the ADS"+
"object:"+myDirectoryEntry.NativeGuid);
Kommentarer
Använd egenskapen NativeGuid när du binder ett objekt i Doménové služby Active Directory.
Note
LDAP-providern (Lightweight Directory Access Protocol) returnerar den globalt unika identifieraren för en DirectoryEntry i ett annat format än Internet Information Services (IIS), Novell NetWare Directory Server (NDS) och WinNT-providers.