<div class="content"><p>The <b>RMIBSetTrapInfo</b> method<a id="Appendix_A_Target_301"></a><a aria-label="Product behavior note 301" href="3bb906f0-b077-47ab-ad11-d8d807afde26#Appendix_A_301" data-linktype="relative-path">&lt;301&gt;</a> specifies a handle to an
event that is signaled whenever a trap needs to be issued.</p><dl>
<dd>
<div><pre> 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
 );
</pre></div>
</dd></dl><p><b>hDimServer: </b>A handle to the RRASM server where
the call is to be executed, see section <a href="1f8cdbcc-9791-4a35-ad78-878b8d110e15" data-linktype="relative-path">3.1.3</a>.</p><p><b>dwPid: </b>Specifies the protocol ID that exported
the variable.</p><p><b>dwRoutingPid: </b>Specifies the routing protocol
that exported the variable.</p><p><b>hEvent: </b>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 <b>dwClientProcessId</b>
which can be signaled whenever a trap needs to be issued. Otherwise the method
SHOULD fail with an appropriate error code as specified in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>.</p><p><b>dwClientProcessId: </b>The current process
identifier.</p><p><b>pInfoStruct: </b>Pointer to an opaque data
structure <a href="4305d67f-9273-49fe-a067-909b6ae8a341" data-linktype="relative-path"><b>DIM_MIB_ENTRY_CONTAINER (section 2.2.1.2.19)</b></a>.
The data structure&#39;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.   </p><p><b>Return Values: </b>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 <a href="5c0c991a-0d3d-4fe5-9503-5128d0d49fe1" data-linktype="relative-path">2.2.4</a>. All values that are
not in the table that follows MUST be treated the same by the RRASM client. </p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>ERROR_SUCCESS</p>
  <p>0x00000000</p>
  </td>
  <td>
  <p>The call was successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>ERROR_ACCESS_DENIED</p>
  <p>0x00000005</p>
  </td>
  <td>
  <p>The calling application does not have sufficient
  privileges.</p>
  </td>
 </tr><tr>
  <td>
  <p>ERROR_INSUFFICIENT_BUFFER</p>
  <p>0x0000007A</p>
  </td>
  <td>
  <p> </p>
  </td>
 </tr></tbody></table>
</dd></dl><p>The opnum field value for this method is 33.</p><p>When processing this call, the RRASM server MUST do the
following:</p><ul><li><p><span><span> 
</span></span>Validate, as specified in section <a href="9373431f-ed29-4639-9f8b-743267c9f9b6" data-linktype="relative-path">2.1.1.1</a>, whether this
method was called by a client that has access to the method. If not, then
return error ERROR_ACCESS_DENIED.</p>
</li><li><p><span><span> 
</span></span>If <i>pInfoStruct</i> is NULL, return an error other than one of
the errors specified in the preceding table.</p>
</li><li><p><span><span> 
</span></span>If <i>dwPid</i> is not specified in the <b>SupportedTransportsList</b>,
return an error other than one of the errors specified in the preceding table.</p>
</li><li><p><span><span> 
</span></span>Call the abstract interface <b>Invoke DIMSVC</b> method
specifying the operation and the parameters to enable RRAS server to perform
the required management task.</p>
</li><li><p><span><span> 
</span></span>If the RRAS server successfully processes the request, return
ERROR_SUCCESS (0x00000000). Otherwise return the error result provided by the RRAS
server.</p>
</li></ul><p>No exceptions are thrown beyond those thrown by the
underlying RPC protocol <a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a>.</p></div>