次の方法で共有


3.2.5.12 NetServerEnum2 Command

The Remote Administration Protocol server MUST process the NetServerEnum2Request as follows:

  1. The server MUST validate that the incoming ParamDesc field of the Remote Administration Protocol request contains the ASCII string "WrLehDz" or "WrLehDO"; if it does not, the server SHOULD format a Remote Administration Protocol response with the Win32ErrorCode set to ERROR_INVALID_PARAMETER (0x0057), and then return the response to the client.<83>

  2. If the information level is any value other than 0 or 1, the server implementing Remote Administration Protocol NetServerEnum2 MUST set the Win32ErrorCode value in the Remote Administration Protocol Response Message to ERROR_INVALID_LEVEL (0x007C).

  3. If the ServerType field in the incoming NetServerEnum2Request contains the SV_TYPE_LOCAL_LIST_ONLY bit, the server MUST return only those servers (or domains) that exist on the same subnet as the server, as specified in [MS-BRWS] section 3.3.4.2. If the server cannot determine the list of servers on the current subnet, or its list of servers (or domains) on the current subnet is empty, it MUST return an empty set of servers (or domains), and set the Win32ErrorCode value in the Remote Administration Protocol Response Message to ERROR_NO_BROWSER_SERVERS_FOUND (0x17E6).

    If the ServerType field in the incoming NetServerEnum2Request contains the SV_TYPE_DOMAIN_ENUM bit, the server MUST return its list of domains, not its list of servers.

    For any other valid value of the ServerType field in the NetServerEnum2Request, the server MUST return the corresponding list of servers as given in the table in section 2.5.5.2.1. If the server cannot determine the list of servers, or if the list of servers is empty, then it MUST return an empty server list, and set the Win32ErrorCode value in the Remote Administration Protocol Response Message to ERROR_NO_BROWSER_SERVERS_FOUND (0x17E6).

  4. The server MUST process the incoming domain field of the Remote Administration Protocol request as specified in [MS-BRWS] section 3.3.5.6.

  5. The Remote Administration Protocol server MUST respond to the NetServerEnum2Request with a Remote Administration Protocol Response Message with the RAPOutParams set to the contents of a NetServerEnum2Response.

  6. If the InfoLevel of the NetServerEnum2Request structure is 0x0000, the Remote Administration Protocol server MUST walk the ServerList and fill in the RAPOutData field of the Remote Administration Protocol response with as many NetServerInfo0 structures, based on as many servers in the list, as can fit within the value specified by the Remote Administration Protocol client's ReceiveBufferSize input parameter (see the packing rules, as specified in section 2.5.11). The server MUST set the EntriesReturned field in the NetServerEnum2Response to the number of NetServerInfo0 structures in the RAPOutData field of the response.

    If the InfoLevel of the NetServerEnum2Request structure is 1, the Remote Administration Protocol server MUST fill in the RAPOutData field of the Remote Administration Protocol response with as many NetServerInfo1 structures as can fit within the value specified by the Remote Administration Protocol client's ReceiveBufferSize input parameter (see the packing rules, as specified in section 2.5.11). The server MUST set the EntriesReturned field in the NetServerEnum2Response to the number of NetServerInfo1 structures in the RAPOutData field of the response.

  7. If the response EntriesReturned field is less than the response EntriesAvailable field, the Remote Administration Protocol server MUST set the Win32ErrorCode value in the Remote Administration Protocol response message to ERROR_MORE_DATA (0x00EA).

  8. If any other errors occur during the response processing, the Remote Administration Protocol server MUST fill in the Win32ErrorCode value in the Remote Administration Protocol response message with the Win32 error code corresponding to the error. Otherwise, the Remote Administration Protocol server MUST set Win32ErrorCode to ERROR_SUCCESS (0X0000).