Partager via


3.2.5.2 NetShareGetInfo Command

The Remote Administration Protocol server MUST process NetShareGetInfoRequest as follows:

  1. The server MUST validate that the incoming ParamDesc field of the Remote Administration Protocol request contains the ASCII string "zWrLh"; 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.<69>

  2. If the information level is any value other than 0, 1, and 2, the server implementing NetShareGetInfo MUST set the Win32ErrorCode value in the Remote Administration Protocol response message to ERROR_INVALID_LEVEL (0x007C).

  3. If the NetName is equal to NULL, the server implementing NetShareGetInfo MUST set the Win32ErrorCode value in the Remote Administration Protocol response message to ERROR_INVALID_PARAMETER (0x0057).

  4. If the request in the ReceiveBuffersSize field is less than the response in the TotalBytesAvailable field, the Remote Administration Protocol server MUST set the Win32ErrorCode value in the Remote Administration Protocol response message to ERROR_MORE_DATA (0x00EA).

  5. The Remote Administration Protocol server MUST query information for the share on the local machine as specified in [MS-SRVS] NetrShareGetInfo (section 3.1.4.10), passing in the following parameters:

    Parameter

    Value

    ServerName

    The local machine name

    NetName

    NetShareGetInfoRequest.NetName

    Level

    NetShareGetInfoRequest.InfoLevel

    If the call succeeds, the server MUST use the resulting SHARE_INFO structure to generate the response as specified in 3.2.5.1. The Remote Administration Protocol server MUST create a Remote Administration Protocol response message with the RAPOutParams set to the contents of a NetShareGetInfoResponse message.

  6. If any other errors occur during the response processing, the Remote Administration Protocol server MUST fill the Win32ErrorCode value in the Remote Administration Protocol response message with the Win32ErrorCode corresponding to the error, as specified in [MS-ERREF]. Otherwise, the Remote Administration Protocol server MUST set Win32ErrorCode to ERROR_SUCCESS (0X0000).