Einzelnen Beitrag anzeigen

Benutzerbild von Remko
Remko

Registriert seit: 10. Okt 2006
Ort: 's-Hertogenbosch, Die Niederlande
222 Beiträge
 
RAD-Studio 2010 Arc
 
#4

Re: Wie finde ich den nächsten GC?

  Alt 23. Mär 2010, 15:04
To determine if a Domain Controller is a Global Catalog you can use DsGetDomainControllerInfo and infolevel 2, this returns a DS_DOMAIN_CONTROLLER_INFO_2 structure (fIsGc flag):
Delphi-Quellcode:
  DS_DOMAIN_CONTROLLER_INFO_2W = record
    NetbiosName: LPWSTR; // might be NULL
    DnsHostName: LPWSTR; // might be NULL
    SiteName: LPWSTR; // might be NULL
    SiteObjectName: LPWSTR; // might be NULL
    ComputerObjectName: LPWSTR; // might be NULL
    ServerObjectName: LPWSTR; // might be NULL
    NtdsDsaObjectName: LPWSTR; // might be NULL
    fIsPdc: BOOL;
    fDsEnabled: BOOL;
    fIsGc: BOOL;
    // Valid iff SiteObjectName non-NULL.
    SiteObjectGuid: GUID;
    // Valid iff ComputerObjectName non-NULL.
    ComputerObjectGuid: GUID;
    // Valid iff ServerObjectName non-NULL;
    ServerObjectGuid: GUID;
    // Valid iff fDsEnabled is TRUE.
    NtdsDsaObjectGuid: GUID;
  end;
See my blog blog
See our Jedi blog
  Mit Zitat antworten Zitat