次の方法で共有


3.1.4.4 RRPC_FWGetGlobalConfig (Opnum 3)

The RRPC_FWGetGlobalConfig method retrieves the value of a global policy configuration option. The client specifies to the server from what store this value MUST be retrieved and in what specific configuration option it is interested.

 unsigned long RRPC_FWGetGlobalConfig(
   [in] FW_CONN_HANDLE rpcConnHandle,
   [in] unsigned short BinaryVersion,
   [in] FW_STORE_TYPE StoreType,
   [in, range(FW_GLOBAL_CONFIG_INVALID+1, FW_GLOBAL_CONFIG_MAX-1)] 
     FW_GLOBAL_CONFIG configID,
   [in] unsigned long dwFlags,
   [in, out, unique, size_is(cbData), length_is(*pcbTransmittedLen)] 
     unsigned char* pBuffer,
   [in] unsigned long cbData,
   [in, out] unsigned long* pcbTransmittedLen,
   [out] unsigned long* pcbRequired
 );

rpcConnHandle: This parameter is an RPC binding handle that connects to the RPC interface of the Firewall and Advanced Security Protocol.

BinaryVersion: This parameter specifies the RPC interface binary version. This implies versions of the methods and versions of the structures.

StoreType: This parameter specifies the policy store from which the client wants to retrieve the configuration option value.

configID: This parameter specifies the specific global policy configuration option the client is interested in retrieving.

dwFlags: This parameter is a combination of flags from the FW_CONFIG_FLAGS enumeration, which modifies the behavior of this method, as specified in the definition of the enumeration.

pBuffer: This is an input/output parameter. This parameter is a pointer to the buffer that the client provides to contain the value of the profile configuration option being requested.

cbData: This parameter is the size of the buffer that the pBuffer parameter points to.

pcbTransmittedLen: This is a pointer to an input and output parameter that specifies the length of the transmitted data within the buffer.

pcbRequired: This is a pointer to an output parameter that specifies the required minimum buffer size in octets in order for the method to be able to return the configuration value. This output parameter is nonzero only if the buffer (pointed to by pBuffer and whose size is cbData) was not big enough to contain the value.

Return Values: The method returns 0 if successful; if failed, it returns a nonzero error code. The field can take any specific error code value, as specified in [MS-ERREF]. The following return values are common.

Return value/code

Description

0x00000005

ERROR_ACCESS_DENIED

The client does not have the required credentials to call the method.

0x00000002

ERROR_FILE_NOT_FOUND

The specific configuration option is not found within the policy. This means that it is not configured. If the option is not configured in any other store, the firewall uses a default value.

0x00000032

ERROR_NOT_SUPPORTED

The store type specified does not support this method.

0x000000EA

ERROR_MORE_DATA

The buffer is not big enough to hold the configuration option value.

0x00000057

ERROR_INVALID_PARAMETER

One of the parameters of this method is incorrect, or is required and not specified. This error can be returned because:

  • The specific configuration option is not meant to be available in the specified store.

  • The specified configuration option is not defined.

  • One of the required values is not specified.

  • The buffer size is not enough to hold the specific value.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol, as specified in [MS-RPCE]. If any lower-layer errors are reported by RPC exception, this exception is converted to an error code and reported to higher-layer protocols via the return value.

The server MUST validate that the client is authorized to perform the requested operation (as defined in section 3.1.4) before executing this method.