Share via


DirectoryEntry.NativeGuid Propriedade

Definição

Obtém o GUID da DirectoryEntry, conforme retornado pelo provedor.

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

Valor da propriedade

A estrutura Guid que representa o GUID da DirectoryEntry, conforme retornado pelo provedor.

Atributos

Exemplos

O exemplo a seguir demonstra as Guid propriedades e NativeGuid da DirectoryEntry classe . Este exemplo obtém o especificado pelo DirectoryEntry usuário e exibe suas Guid propriedades e 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);  

Comentários

Use a NativeGuid propriedade ao associar um objeto em Active Directory Domain Services.

Observação

O provedor LDAP (Lightweight Directory Access Protocol) retorna o identificador global exclusivo de um DirectoryEntry em um formato diferente dos provedores IIS (Serviços de Informações da Internet), Novell NetWare Directory Server (NDS) e WinNT.

Aplica-se a

Confira também