DirectoryEntry.NativeGuid Właściwość

Definicja

Pobiera identyfikator GUID obiektu DirectoryEntry, zwrócony przez dostawcę.

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

Wartość właściwości

Struktura Guid reprezentująca identyfikator GUID DirectoryEntryobiektu , zwrócony przez dostawcę.

Atrybuty

Przykłady

W poniższym przykładzie pokazano Guid właściwości DirectoryEntry i NativeGuid klasy . Ten przykład pobiera określony przez DirectoryEntry użytkownika i wyświetla jego Guid właściwości i NativeGuid .

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);  

Uwagi

NativeGuid Użyj właściwości podczas tworzenia powiązania obiektu w Active Directory Domain Services.

Uwaga

Dostawca Lightweight Directory Access Protocol (LDAP) zwraca globalnie unikatowy identyfikator elementu DirectoryEntry w innym formacie niż Internet Information Services (IIS), Serwer katalogów NetWare (NDS) i dostawcy WinNT.

Dotyczy

Zobacz też