IADsWinNTSystemInfo interface (iads.h)

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")

Inheritance

The IADsWinNTSystemInfo interface inherits from the IDispatch interface.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header iads.h

See also

CoCreateInstance

IADsWinNTSystemInfo Property Methods

IDispatch