3.1.4.34 RMIBSetTrapInfo (Opnum 33)

The RMIBSetTrapInfo method<301> specifies a handle to an event that is signaled whenever a trap needs to be issued.

 DWORD RMIBSetTrapInfo(
   [in] DIM_HANDLE hDimServer,
   [in] DWORD dwPid,
   [in] DWORD dwRoutingPid,
   [in] ULONG_PTR hEvent,
   [in] DWORD dwClientProcessId,
   [in, out] PDIM_MIB_ENTRY_CONTAINER pInfoStruct
 );

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

dwPid: Specifies the protocol ID that exported the variable.

dwRoutingPid: Specifies the routing protocol that exported the variable.

hEvent: A handle to an event that is signaled when a trap needs to be issued. This MUST be a handle to an event on the RRAS server which is created within the process specified by dwClientProcessId which can be signaled whenever a trap needs to be issued. Otherwise the method SHOULD fail with an appropriate error code as specified in [MS-ERREF].

dwClientProcessId: The current process identifier.

pInfoStruct: Pointer to an opaque data structure DIM_MIB_ENTRY_CONTAINER (section 2.2.1.2.19). The data structure's format is determined by the router manager or router manager client that is servicing the call. The data structure MUST contain information that specifies the variable being created and the value to assign to the variable.  

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, it contains an error code, as specified in [MS-ERREF] or in section 2.2.4. All values that are 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.

ERROR_INSUFFICIENT_BUFFER

0x0000007A

The opnum field value for this method is 33.

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 not, then return error ERROR_ACCESS_DENIED.

  • If pInfoStruct is NULL, return an error other than one of the errors specified in the preceding table.

  • If dwPid is not specified in the SupportedTransportsList, 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 successfully processes the request, return ERROR_SUCCESS (0x00000000). Otherwise return the error result provided by the RRAS server.

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