<div class="content"><p> </p><p>The RemRelease (Opnum 5) method requests that a specified
number of <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_10ffa972-2b70-4e41-b025-6785babac521" data-linktype="relative-path">reference counts</a></span> be
decremented on a specified number of interfaces on an object.</p><dl>
<dd>
<div><pre> HRESULT RemRelease(
   [in] unsigned short cInterfaceRefs,
   [in, size_is(cInterfaceRefs)] REMINTERFACEREF InterfaceRefs[]
 );
</pre></div>
</dd></dl><p><b>cInterfaceRefs: </b> This MUST specify the number
of elements in the <i>InterfaceRefs</i> parameter.</p><p><b>InterfaceRefs: </b> This MUST specify an array of <span><a href="69bc8015-c524-4988-b7fa-96094f0f74e9" data-linktype="relative-path">REMINTERFACEREF</a></span>
structures, each of which specifies the number of public and private references
to be released on the interface identified by the <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_74540339-daab-46ea-a8f9-fe8fca3b150c" data-linktype="relative-path">IPID</a></span>.</p><p>When processing this <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_d4ad46fe-cbab-43f2-a125-b2f125824f33" data-linktype="relative-path">ORPC</a></span> call, the <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_5b284f60-ee33-4d15-9a7b-0fb82d7c6b68" data-linktype="relative-path">object
exporter</a></span> MUST do the following:</p><p>For each REMINTERFACEREF element in the <i>InterfaceRefs</i>
array argument:</p><ul><li><p><span><span> 
</span></span>The object exporter MUST look up <b>REMINTERFACEREF.ipid</b> in
the IPID table to find the IPID entry. If the entry is found, the object
exporter MUST do the following:</p>
<ul><li><p><span><span>  </span></span>It
MUST decrement the public reference count in the IPID entry by <b>REMINTERFACEREF.cPublicRefs</b>.
If <b>REMINTERFACEREF.cPublicRefs</b> is greater than the public reference
count in the IPID entry, the object exporter MUST set the public reference
count in the IPID entry to 0.</p>
</li><li><p><span><span>  </span></span>It
MUST decrement the private reference count associated with the client in the
IPID entry by <b>REMINTERFACEREF.cPrivateRefs</b>. If <b>REMINTERFACEREF.cPrivateRefs</b>
is greater than the private reference count in the IPID entry, the object
exporter MUST set the private reference count in the IPID entry to 0.<a id="Appendix_A_Target_49"></a><a aria-label="Product behavior note 49" href="acc42954-4073-4f05-b850-efd562022077#Appendix_A_49" data-linktype="relative-path">&lt;49&gt;</a></p>
</li></ul></li><li><p><span><span> 
</span></span>If the public and private reference counts are zero, the object
exporter MUST do the following:</p>
<ul><li><p><span><span>  </span></span>It
MUST remove the IPID entry from the IPID table.</p>
</li><li><p><span><span>  </span></span>It
MUST remove the IPID from the list of IPIDs in the OID table.</p>
</li><li><p><span><span>  </span></span>It
MUST remove the application-specific state of the object that implements the
interface from the IPID entry.</p>
</li><li><p><span><span>  </span></span>It
MUST instruct <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span> to stop
listening on the interface, as specified in <span><a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a></span> section
3.1.20 (rpc_server_unregister_if).</p>
</li><li><p><span><span>  </span></span>If
the list of IPIDs in the OID entry is empty, it MUST remove the OID entry from
the OID table.</p>
</li><li><p><span><span>  </span></span>It
MUST remove the application-specific state of the object from the OID entry.</p>
</li><li><p><span><span>  </span></span>It
MUST contact the <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_19f75354-9b0b-47cb-a00b-4ff196883b32" data-linktype="relative-path">object resolver</a></span> to
release the OID.</p>
</li></ul></li></ul></div>