次の方法で共有


3.1.4.1 RMprAdminServerGetInfo (Opnum 0)

The RMprAdminServerGetInfo method retrieves port-related configuration information for the specified RRAS server using the handle hDimServer. The dwLevel defines the type of information requested. The caller MUST pass a pointer to a valid DIM_INFORMATION_CONTAINER (section 2.2.1.2.1). The caller SHOULD free the memory pointed to by pInfoStruct.

 DWORD RMprAdminServerGetInfo(
   [in] DIM_HANDLE hDimServer,
   [in] DWORD dwLevel,
   [out] PDIM_INFORMATION_CONTAINER pInfoStruct
 );

hDimServer: A handle to the RRASM server where the call is executed, see section 3.1.3.

dwLevel: This is of type DWORD and MUST be set to one of the following values.

Value

Meaning

0

After the method returns, the memory pointed by pInfoStruct->pBuffer is interpreted as MPR_SERVER_0 (section 2.2.1.2.61).

1

After the method returns, the memory pointed by pInfoStruct->pBuffer is interpreted as MPR_SERVER_1 (section 2.2.1.2.62).<249>

2

After the method returns, the memory pointed by pInfoStruct->pBuffer is interpreted as MPR_SERVER_2 (section 2.2.1.2.63).<250>

pInfoStruct: This is a pointer of type DIM_INFORMATION_CONTAINER. DIM_INFORMATION_CONTAINER.dwBufferSize SHOULD be initialized to zero (0). Upon successful return, the pInfoStruct->pBuffer is typecast to MPR_SERVER_0, MPR_SERVER_1,<251> or MPR_SERVER_2<252> based on the dwLevel value.

Return Values: A 32-bit, unsigned integer value that indicates return status. A return value of ERROR_SUCCESS (0x00000000) indicates that the operation was completed successfully; otherwise, the return value contains an error code, as specified in [MS-ERREF] or in section 2.2.4. All values not in the table that follows MUST be treated the same by the RRASM client.

Return value/code

Description

ERROR_SUCCESS

0x00000000

The call was successful.

ERROR_ACCESS_DENIED

0x00000005

The calling application does not have sufficient privileges as specified in section 2.1.1.1.

The opnum field value for this method is 0.

When processing this call, the RRASM server MUST do the following:

  • Validate, as specified in section 2.1.1.1, whether this method was called by a client that has access to the method. If the client does not have access, then return error ERROR_ACCESS_DENIED (0x00000005).

  • If pInfoStruct is NULL, return an error other than those specified in the previous table.

  • If dwLevel is not supported, return an error other than one of the errors specified in the preceding table.

  • Call the abstract interface Invoke DIMSVC method specifying the operation and the parameters to enable RRAS server to perform the required management task.

  • If the RRAS server processes the request successfully, populate pInfoStruct with the information returned by the RRAS server. Return ERROR_SUCCESS (0x00000000).

  • Otherwise return the error provided by the RRAS server.

No exceptions are thrown beyond those thrown by the underlying RPC protocol [MS-RPCE].