IADsWinNTSystemInfo interface

The IADsWinNTSystemInfo interface retrieves the WinNT system information about a computer. Such system information includes user account name, user domain, host name, and the primary domain controller of the host computer.

The IADsWinNTSystemInfo interface is implemented on the WinNTSystemInfo object residing in Activeds.dll, which is included in the standard installation of ADSI for domain-capable editions of Windows. You must explicitly create an instance of the WinNTSystemInfo object to call the methods on the IADsWinNTSystemInfo interface. This requirement means creating an WinNTSystemInfo instance with the CoCreateInstance function in C/C++.


IADsWinNTSystemInfo *pNTsys;
HRESULT hr = CoCreateInstance(CLSID_WinNTSystemInfo,
                              NULL,
                              CLSCTX_INPROC_SERVER,
                              IID_IADsWinNTSystemInfo,
                              (void**)&pNTsys);

You can also use the New operator in Visual Basic.


Dim ntSys As New WinNTSystemInfo

You can also call the CreateObject function in a scripting environment, supplying "WinNTSystemInfo" as the ProgID.


Dim ntSys
Set ntSys = CreateObject("WinNTSystemInfo")

Members

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

Properties

The IADsWinNTSystemInfo interface has these properties.

PropertyAccess typeDescription

ComputerName

Read-only

Retrieves the host name of the computer.

DomainName

Read-only

Retrieves the domain name that the user is on.

PDC

Read-only

Retrieves the name of the primary domain controller to which the host computer belongs.

UserName

Read-only

Retrieves the name of the user account under which the method is called.

 

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Iads.h

DLL

Activeds.dll

IID

IID_IADsWinNTSystemInfo is defined as 6C6D65DC-AFD1-11D2-9CB9-0000F87A369E

See also

IDispatch
IADsWinNTSystemInfo Property Methods
CoCreateInstance

 

 

Show: