DirectoryEntry.NativeGuid Свойство

Определение

Получает GUID объекта DirectoryEntry, возвращенный поставщиком.

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

Значение свойства

Структура Guid, представляющая GUID объекта DirectoryEntry, возвращенный поставщиком.

Атрибуты

Примеры

В следующем примере показаны Guid свойства DirectoryEntry и NativeGuid класса . В этом примере возвращается заданный DirectoryEntry пользователем объект и отображаются его Guid свойства и 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);  

Комментарии

NativeGuid Используйте свойство при привязке объекта в доменные службы Active Directory.

Примечание

Поставщик LDAP возвращает глобальный уникальный идентификатор объекта в формате, отличном от DirectoryEntry формата служб IIS, Novell NetWare Directory Server (NDS) и WinNT.

Применяется к

См. также раздел