Partager via


3.2.4.1 NetrWkstaGetInfo (Opnum 0)

The NetrWkstaGetInfo method returns details about the configuration of a remote computer, including the computer name and major and minor version numbers of the operating system.

 unsigned long NetrWkstaGetInfo(
   [in, string, unique] WKSSVC_IDENTIFY_HANDLE ServerName,
   [in] unsigned long Level,
   [out, switch_is(Level)] LPWKSTA_INFO WkstaInfo
 );

ServerName: A WKSSVC_IDENTIFY_HANDLE structure (section 2.2.2.1) that identifies the server (2). The client MUST map this structure to an RPC binding handle ([C706] sections 4.3.5 and 5.1.5.2). The server MUST ignore this parameter.

Level: The information level of the data. This parameter MUST be one of the following values.

Value

Meaning

0x00000064

Details are returned in a WKSTA_INFO_100 structure (section 2.2.5.1).

0x00000065

Details are returned in a WKSTA_INFO_101 structure (section 2.2.5.2).

0x00000066

Details are returned in a WKSTA_INFO_102 structure (section 2.2.5.3).

0x000001F6

Details are returned in a WKSTA_INFO_502 structure (section 2.2.5.4).

WkstaInfo: A pointer to the buffer that receives the data. The format of this data depends on the value of the level parameter.

Return Values: When the message processing result meets the description in column two of the following table, this method MUST return one of the following values ([MS-ERREF] section 2.2).

Value/code

Meaning

NERR_Success

0x00000000

The operation completed successfully.

ERROR_ACCESS_DENIED

0x00000005

The caller does not have the permissions to perform the operation.

ERROR_INVALID_LEVEL

0x0000007C

The information level is invalid.

The response of the server depends on the value of the Level parameter. If the Level parameter is not equal to one of the valid values, the server MUST fail the call and return ERROR_INVALID_LEVEL.

The server SHOULD<29> enforce security measures to verify that the caller has the required permissions to execute this routine. If the server enforces security measures, and the caller does not have the required credentials, the server MUST fail the call and return ERROR_ACCESS_DENIED. Specifications for determining the identity of the caller for the purpose of performing an access check are in [MS-RPCE] section 3.3.3.1.3.

If the Level parameter equals 0x00000064, the server MUST fill in the WKSTA_INFO_100 structure WkstaInfo100 member (section 2.2.4.1) of the WkstaInfo parameter as follows:

  • wki100_computername is set to ComputerNameNetBIOS (section 3.2.1.5)

  • wki100_langroup is set to DomainNameFQDN (section 3.2.1.5)

  • wki100_platform_id is set to Platform_Id (section 3.2.1)

  • wki100_ver_major is set to Ver_Major (section 3.2.1)

  • wki100_ver_minor is set to Ver_Minor (section 3.2.1)

If the Level parameter equals 0x00000065, the server MUST fill in the WKSTA_INFO_101 structure WkstaInfo101 member (section 2.2.4.1) of the WkstaInfo parameter as follows:

  • wki101_computername is set to ComputerNameNetBIOS

  • wki101_langroup is set to DomainNameFQDN

  • wki101_platform_id is set to Platform_Id

  • wki101_ver_major is set to Ver_Major

  • wki101_ver_minor is set to Ver_Minor

  • wki101_lanroot is set to NULL

If the Level parameter equals 0x00000066, the server MUST fill in the WKSTA_INFO_102 structure WkstaInfo102 member (section 2.2.4.1) of the WkstaInfo parameter as follows:

  • wki102_computername is set to ComputerNameNetBIOS

  • wki102_langroup is set to DomainNameFQDN

  • wki102_platform_id is set to Platform_Id

  • wki102_ver_major is set to Ver_Major

  • wki102_ver_minor is set to Ver_Minor

  • wki102_lanroot is set to NULL

  • wki102_logged_on_users is set to the number of users who are currently active on the computer

If the Level parameter equals 0x000001F6, the server MUST set values in the WKSTA_INFO_502 structure WkstaInfo502 member (section 2.2.4.1) specified by the WkstaInfo parameter from elements of the ADM (section 3.2.1) as follows:

  • wki502_keep_conn is set to Keep_Connection

  • wki502_max_cmds is set to Max_Commands

  • wki502_sess_timeout is set to Session_TimeOut

  • wki502_dormant_file_limit MAY<30> be set to DormantFileLimit