Export (0) Print
Expand All

2.6 ServerGetInfo Abstract Interface

The ServerGetInfo abstract interface retrieves current configuration information for the local machine.

 DWORD ServerGetInfo(
   [in] DWORD level,
   [out] LPBYTE* bufptr
 );

level: Specifies the information level of the data. This parameter can be one of the following values.

Value

Meaning

100

Return the machine name and platform information. The bufptr parameter points to a SERVER_INFO_100 structure.

101

Return the machine name, type, and associated software. The bufptr parameter points to a SERVER_INFO_101 structure.

bufptr: Pointer to the buffer that receives the data. The format of this data depends on the value of the level parameter.

Note When the 101 information level is requested, the machine is considered to be a domain controller (SV_TYPE_DOMAIN_CTRL or SV_TYPE_DOMAIN_BAKCTRL) when it supports the protocols required by the Active Directory Domain Service system (either with or without Web Services) as described in [MS-ADOD] section 2.8. Once it is established that the machine is a domain controller, it is considered to be a primary domain controller (SV_TYPE_DOMAIN_CTRL) if it is currently hosting the PdcEmulationMasterRole FSMO role (as specified in [MS-ADTS] section 3.1.1.1.11); otherwise it is considered to be a backup domain controller (SV_TYPE_DOMAIN_BAKCTRL). The machine determines whether it is hosting the PdcEmulationMasterRole by invoking the IsEffectiveRoleOwner function with the roleObject parameter set to RoleObject(Default NC, PdcEmulationMasterRole) (see [MS-ADTS] section 3.1.1.5.1.8). When the 101 information level is requested, and the machine is not considered to be a domain controller as specified above, then it is considered to be a workstation (SV_TYPE_WORKSTATION). Additional SV_TYPE_* values can be returned as appropriate.

Return Values: If the function succeeds, the return value is NERR_Success.

If the function fails, the return value can be one of the following error codes:

Return value/code

Description

0x00000005

ERROR_ACCESS_DENIED

The user does not have access to the requested information.

0x0000007C

ERROR_INVALID_LEVEL

The value specified for the level parameter is invalid.

0x00000057

ERROR_INVALID_PARAMETER

The specified parameter is invalid.

0x00000008

ERROR_NOT_ENOUGH_MEMORY

Sufficient memory is not available.

Show:
© 2016 Microsoft