DirectoryEntry.NativeGuid Właściwość

Definicja

Pobiera identyfikator GUID DirectoryEntry, który został zwrócony przez dostawcę.Gets the GUID of the DirectoryEntry, as returned from the provider.

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
Public ReadOnly Property NativeGuid As String

Wartość właściwości

Struktura Guid, która reprezentuje identyfikator GUID DirectoryEntry, jak to zostało zwrócone przez dostawcę.A Guid structure that represents the GUID of the DirectoryEntry, as returned from the provider.

Atrybuty

Przykłady

Poniższy przykład ilustruje Guid i NativeGuid właściwości klasy DirectoryEntry.The following example demonstrates the Guid and NativeGuid properties of the DirectoryEntry class. Ten przykład pobiera DirectoryEntry określone przez użytkownika i wyświetla jego właściwości Guid i NativeGuid.This example gets the user-specified DirectoryEntry and displays its Guid and NativeGuid properties.

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

Użyj właściwości NativeGuid podczas wiązania obiektu w Active Directory Domain Services.Use the NativeGuid property when binding an object in Active Directory Domain Services.

Uwaga

Dostawca protokołu LDAP (Lightweight Directory Access Protocol) zwraca unikatowy identyfikator globalny DirectoryEntry w innym formacie niż Internet Information Services (IIS), Novell NetWare Directory Server (NDS) i WinNT Providers.The Lightweight Directory Access Protocol (LDAP) provider returns the globally unique identifier of a DirectoryEntry in a different format than the Internet Information Services (IIS), Novell NetWare Directory Server (NDS), and WinNT providers.

Dotyczy

Zobacz też