Export (0) Print
Expand All

IADsADSystemInfo interface

The IADsADSystemInfo interface retrieves data about the local computer if it is running a Windows operating system in a Windows 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")

Members

The IADsADSystemInfo interface inherits from the IDispatch interface. IADsADSystemInfo also has these types of members:

Methods

The IADsADSystemInfo interface has these methods.

MethodDescription
GetAnyDCName

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

GetDCSiteName

Retrieves the name of the local computer site.

GetTrees

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

RefreshSchemaCache

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

 

Properties

The IADsADSystemInfo interface has 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 client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Iads.h

DLL

Activeds.dll

IID

IID_IADsADSystemInfo is defined as 5BB11929-AFD1-11D2-9CB9-0000F87A369E

See also

IADsADSystemInfo Property Methods
CoCreateInstance

 

 

Show:
© 2014 Microsoft