<div class="content"><p> </p><p>The ComplexPing (Opnum 2) method is invoked to create or
modify a <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_719e35c6-323e-4f37-82ef-c466f6c4992a" data-linktype="relative-path">ping set</a></span>, to <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_6564e672-5604-4d40-86b7-96f4affe50a7" data-linktype="relative-path">ping</a></span>
a ping set, or to perform a combination of these operations in one invocation.</p><dl>
<dd>
<div><pre> [idempotent] error_status_t ComplexPing(
   [in] handle_t hRpc,
   [in, out] SETID* pSetId,
   [in] unsigned short SequenceNum,
   [in] unsigned short cAddToSet,
   [in] unsigned short cDelFromSet,
   [in, unique, size_is(cAddToSet)] 
     OID AddToSet[],
   [in, unique, size_is(cDelFromSet)] 
     OID DelFromSet[],
   [out] unsigned short* pPingBackoffFactor
 );
</pre></div>
</dd></dl><p><b>hRpc: </b>This MUST specify an <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span>
binding handle as specified in <span><a href="../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15" data-linktype="relative-path">[MS-RPCE]</a></span>
section <span><a href="../ms-rpce/de240b5e-6487-485e-9086-5069977f89db" data-linktype="relative-path">3.2.2.3.1</a></span>.</p><p><b>pSetId: </b>This MUST specify the <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_ccd51872-1e2e-4333-933a-27ea696ac19c" data-linktype="relative-path">SETID</a></span>
of the ping set to ping. If the SETID specified by the client is zero, the <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_19f75354-9b0b-47cb-a00b-4ff196883b32" data-linktype="relative-path">object
resolver</a></span> MUST return the SETID of a new ping set containing the <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_aaaf2f1a-0b0a-487e-a0f0-c3510a6091b2" data-linktype="relative-path">OIDs</a></span>
specified in AddToSet. If the SETID specified by the client is not zero, the <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_5b284f60-ee33-4d15-9a7b-0fb82d7c6b68" data-linktype="relative-path">object
exporter</a></span> MUST not change the SETID.</p><p><b>SequenceNum: </b>This MUST specify a sequence
number shared between the client and the object resolver.</p><p><b>cAddToSet: </b>This MUST specify the number of
OIDs in the AddToSet array.</p><p><b>cDelFromSet: </b>This MUST specify the number of
OIDs in the DelFromSet array.</p><p><b>AddToSet: </b>This MUST specify an array of OIDs
to add to the set.</p><p><b>DelFromSet: </b>This MUST specify an array of OIDs
to remove from the set.</p><p><b>pPingBackoffFactor: </b>This MUST contain a hint
to reduce ping load on the server. Servers MAY set the hint to an
implementation-specific value. Clients MAY choose to treat this as zero always.<a id="Appendix_A_Target_55"></a><a aria-label="Product behavior note 55" href="acc42954-4073-4f05-b850-efd562022077#Appendix_A_55" data-linktype="relative-path">&lt;55&gt;</a></p><p>When processing this call:</p><ul><li><p><span><span> 
</span></span>The object resolver MAY compare the client&#39;s credentials against
a set of implementation-specific permissions.<a id="Appendix_A_Target_56"></a><a aria-label="Product behavior note 56" href="acc42954-4073-4f05-b850-efd562022077#Appendix_A_56" data-linktype="relative-path">&lt;56&gt;</a> If the
permissions do not allow access to the client credentials, the object resolver
MUST return ERROR_ACCESS_DENIED (as specified in <span><a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a></span>
section <span><a href="../ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d" data-linktype="relative-path">2.2</a></span>).</p>
</li><li><p><span><span> 
</span></span>If the client specifies a nonzero SETID, the object resolver MUST
look up the SETID entry for the SETID. If the entry is not found, the object
resolver MUST return OR_INVALID_SET (as specified in [MS-ERREF] section 2.2).</p>
</li><li><p><span><span> 
</span></span>If the entry is found, and if it has a sequence number greater
than that specified by the client, the object resolver MUST take no further
action and return success.</p>
</li><li><p><span><span> 
</span></span>Otherwise, the object resolver MUST do the following:</p>
<ul><li><p><span><span>  </span></span>For
each OID in the AddToSet list:</p>
<ul><li><p><span><span> 
</span></span>It MUST look up the OID in the OID list in the SETID entry.</p>
</li><li><p><span><span> 
</span></span>If not found:</p>
<ul><li><p><span><span> 
</span></span>It MUST look up the OID entry in the OID table. If found:</p>
<ul><li><p><span><span> 
</span></span>It MUST increment the <span><a href="ba4c4d80-ef81-49b4-848f-9714d72b5c01#gt_10ffa972-2b70-4e41-b025-6785babac521" data-linktype="relative-path">reference count</a></span> in
the OID entry.</p>
</li><li><p><span><span> 
</span></span>It MUST add the OID to the OID list in the SETID entry.</p>
</li></ul></li><li><p><span><span> 
</span></span>If the OID entry is not found, it MUST return OR_INVALID_OID
([MS-ERREF] section 2.2).</p>
</li></ul></li></ul></li><li><p><span><span>  </span></span>For
each OID in the DelFromSet list:</p>
<ul><li><p><span><span> 
</span></span>It MUST look up the OID in the OID list in the SETID entry.</p>
</li><li><p><span><span> 
</span></span>If found:</p>
<ul><li><p><span><span> 
</span></span>It MUST look up the OID entry in the OID table. If found:</p>
<ul><li><p><span><span> 
</span></span>It MUST decrement the reference count in the OID entry.</p>
</li></ul></li><li><p><span><span> 
</span></span>If the OID entry is not found, it MUST proceed to the following
step.</p>
</li><li><p><span><span> 
</span></span>It MUST remove the OID from the OID list in the SETID entry. </p>
</li></ul></li></ul></li><li><p><span><span>  </span></span>It
MUST reset the ping timer in the SETID entry.</p>
</li><li><p><span><span>  </span></span>It
MUST set the sequence number to the value specified by the client.</p>
</li></ul></li><li><p><span><span> 
</span></span>If the client specifies a NULL SETID, it MUST add a new SETID
entry as follows:</p>
<ul><li><p><span><span>  </span></span>It
MUST allocate a SETID.</p>
</li><li><p><span><span>  </span></span>It
MUST set the sequence number to the value specified by the client.</p>
</li><li><p><span><span>  </span></span>For
each OID in the AddToSet list, it MUST do the following:</p>
<ul><li><p><span><span> 
</span></span>It MUST look up the OID entry. If the entry is found: </p>
<ul><li><p><span><span> 
</span></span>It MUST increment the reference count in the OID entry.</p>
</li><li><p><span><span> 
</span></span>It MUST add the OID to the OID list in the SETID entry.</p>
</li></ul></li></ul></li><li><p><span><span>  </span></span>It
MUST start the ping set timer. It MUST initialize the timer, as specified in
section <span><a href="ce2c5aa4-30d7-4411-b0ff-9efe7909920e" data-linktype="relative-path">3.1.2.2</a></span>.</p>
</li><li><p><span><span>  </span></span>It
MUST return the SETID to the client.</p>
</li></ul></li></ul></div>