Compartilhar via


DirectoryEntry.NativeGuid Propriedade

Definição

Obtém o GUID do DirectoryEntry, conforme retornado do 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

Uma Guid estrutura que representa o GUID do DirectoryEntry, conforme retornado do provedor.

Atributos

Exemplos

O exemplo a seguir demonstra as propriedades e NativeGuid as Guid propriedades da DirectoryEntry classe. Este exemplo obtém o usuário especificado DirectoryEntry e exibe suas propriedades e NativeGuid propriedadesGuid.

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

Comentários

Use a NativeGuid propriedade ao associar um objeto no 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), NDS (Novell NetWare Directory Server) e WinNT.

Aplica-se a

Confira também