Click to Rate and Give Feedback

  Switch on low bandwidth view
IADsADSystemInfo Interface

The IADsADSystemInfo interface retrieves data about the local computer if it is running a Windows 2000 operating system in a Windows 2000 domain. For example, you can get the domain, site, and distinguished name of the local computer.

The IADsADSystemInfo interface is implemented on the ADSystemInfo object residing in adsldp.dll, which is included with the standard installation of ADSI on Windows 2000. You must explicitly create an instance of the ADSystemInfo object in order to call the methods on the IADsADSystemInfo interface. This requirement amounts to creating an ADSystemInfo instance with the CoCreateInstance function in C/C++.

IADsADSystemInfo *pADsys;
HRESULT hr = CoCreateInstance(CLSID_ADSystemInfo,
                              NULL,
                              CLSCTX_INPROC_SERVER,
                              IID_IADsADSystemInfo,
                              (void**)&pADsys);

You can also use the New operator in Visual Basic.

Dim adSys as New ADSystemInfo

Or you can call the CreateObject function in a scripting environment, supplying "ADSystemInfo" as the ProgID.

Dim adSys
Set adSys = CreateObject("ADSystemInfo")

Methods

The IADsADSystemInfo interface inherits the methods of the IDispatch interface.

In addition, IADsADSystemInfo defines the following methods.

MethodDescription

get_UserName

Retrieves the Active Directory distinguished name of the current user, which is the logged-on user or the user impersonated by the calling thread.

get_ComputerName

Retrieves the distinguished name of the local computer.

get_SiteName

Retrieves the site name of the local computer.

get_DomainShortName

Retrieves the short name of the local computer domain, for example "myDom".

get_DomainDNSName

Retrieves the DNS name of the local computer domain, for example "example.fabrikam.com".

get_ForestDNSName

Retrieves the DNS name of the local computer forest.

get_PDCRoleOwner

Retrieves the distinguished name of the NTDS-DSA object for the DC that owns the primary domain controller role in the local computer domain.

get_SchemaRoleOwner

Retrieves the distinguished name of the NTDS-DSA object for the DC that owns the schema role in the local computer forest.

get_IsNativeMode

Determines whether the local computer domain is in native or mixed mode.

GetAnyDCName

Retrieves the DNS name of a domain controller in the local computer domain.

GetDCSiteName

Retrieves the name of the local computer site.

RefreshSchemaCache

Refreshes the ADSI Active Directory schema cache on the local computer.

GetTrees

Retrieves the DNS names of all the directory trees in the local computer forest.

Properties

The IADsADSystemInfo interface defines the following properties. The preceding table includes access methods for these properties.

PropertyAccess typeDescription

ComputerName

Read-only

Retrieves the distinguished name of the local computer.

DomainDNSName

Read-only

Retrieves the DNS name of the local computer domain, for example "example.fabrikam.com".

DomainShortName

Read-only

Retrieves the short name of the local computer domain, for example "myDom".

ForestDNSName

Read-only

Retrieves the DNS name of the local computer forest.

IsNativeMode

Read-only

Determines whether the local computer domain is in native or mixed mode.

PDCRoleOwner

Read-only

Retrieves the distinguished name of the NTDS-DSA object for the DC that owns the primary domain controller role in the local computer domain.

SchemaRoleOwner

Read-only

Retrieves the distinguished name of the NTDS-DSA object for the DC that owns the schema role in the local computer forest.

SiteName

Read-only

Retrieves the site name of the local computer.

UserName

Read-only

Retrieves the Active Directory distinguished name of the current user, which is the logged-on user or the user impersonated by the calling thread.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderIads.h
DLLActiveds.dll
IIDIID_IADsADSystemInfo is defined as 5BB11929-AFD1-11D2-9CB9-0000F87A369E

See Also

IADsADSystemInfo Property Methods
CoCreateInstance


Send comments about this topic to Microsoft

Build date: 1/15/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker