DirectoryEntry.NativeGuid Eigenschaft

Definition

Ruft die GUID des DirectoryEntry ab (wie vom Anbieter zurückgegeben).

public:
 property System::String ^ NativeGuid { System::String ^ get(); };
public string NativeGuid { get; }
[System.ComponentModel.Browsable(false)]
[System.DirectoryServices.DSDescription("DSNativeGuid")]
public string NativeGuid { get; }
member this.NativeGuid : string
[<System.ComponentModel.Browsable(false)>]
[<System.DirectoryServices.DSDescription("DSNativeGuid")>]
member this.NativeGuid : string
Public ReadOnly Property NativeGuid As String

Eigenschaftswert

Eine Guid-Struktur, die die GUID des DirectoryEntry darstellt (wie vom Anbieter zurückgegeben).

Attribute

Beispiele

Im folgenden Beispiel werden die Guid Eigenschaften und NativeGuid der DirectoryEntry -Klasse veranschaulicht. In diesem Beispiel wird die vom Benutzer angegebene DirectoryEntry und deren Guid Eigenschaften und NativeGuid angezeigt.

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);  
String^ myADSPath = "LDAP://onecity/CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com";  
DirectoryEntry^ myDirectoryEntry = gcnew DirectoryEntry(myADSPath);  

// Display the Guid and NativeGuid.  
Console::WriteLine("The GUID of the ADS object: {0}", myDirectoryEntry->Guid));  
Console::WriteLine("The Native GUID of the ADS object: {0}",  
                   myDirectoryEntry->NativeGuid);  

Hinweise

Verwenden Sie die NativeGuid -Eigenschaft, wenn Sie ein Objekt in Active Directory Domain Services binden.

Hinweis

Der LDAP-Anbieter (Lightweight Directory Access Protocol) gibt den global eindeutigen Bezeichner eines DirectoryEntry in einem anderen Format als die Internetinformationsdienste (IIS), Novell NetWare Directory Server (NDS) und WinNT-Anbieter zurück.

Gilt für:

Weitere Informationen