<div class="content"><p>The R_WinsDoScavengingNew method requests a specific <a href="a83205a2-23e2-41bb-84e1-4d968aaae4e8#gt_345c3de7-adfa-4386-9ba5-f5f572af489c" data-linktype="relative-path">scavenging</a> operation on the
<a href="a83205a2-23e2-41bb-84e1-4d968aaae4e8#gt_cb0d3fc4-7e24-49af-82c4-91a35bca857f" data-linktype="relative-path">target WINS server</a>.</p><dl>
<dd>
<div><pre> DWORD R_WinsDoScavengingNew(
   [in] handle_t ServerHdl,
   [in, ref] PWINSINTF_SCV_REQ_T pScvReq
 );
</pre></div>
</dd></dl><p><b>ServerHdl: </b>An <a href="a83205a2-23e2-41bb-84e1-4d968aaae4e8#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> binding over IP
address/HostName to the <a href="a83205a2-23e2-41bb-84e1-4d968aaae4e8#gt_bafb050b-b593-4517-8093-f721bd2378ac" data-linktype="relative-path">WINS</a>
server. RPC uses this binding internally to determine which WINS server the
call is directed to.</p><p><b>pScvReq: </b>A pointer to a WINSINTF_SCV_REQ_T
structure (section <a href="aaeca729-2562-4717-a545-58177e58187f" data-linktype="relative-path">2.2.2.12</a>)
that defines the type of scavenging operation.</p><p><b>Return Values: </b>A 32-bit unsigned integer that
indicates the return status. A return value of ERROR_SUCCESS (0x00000000)
indicates that the operation completed successfully. A nonzero return value is
a Win32 error code, as specified in <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>.
The following Win32 error codes can be returned:</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Return value/code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000000</p>
  <p>ERROR_SUCCESS</p>
  </td>
  <td>
  <p>The call was successful.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000005</p>
  <p>ERROR_ACCESS_DENIED</p>
  </td>
  <td>
  <p>The caller doesn&#39;t have sufficient permissions.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>Exceptions Thrown:</b> No exceptions SHOULD be 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><p><b>Processing and Response Requirements:</b></p><p>When <a href="b8437539-dd6f-4857-94b2-f7dfe4370b3c" data-linktype="relative-path">R_WinsDoScanvengingNew</a>
is called, the method returns immediately without waiting for scavenging to
start. The server just queues a request for the scavenging operation; the
internal state and configuration of the WINS server and the value of the <i>fForce</i>
member in the WINSINTF_SCV_REQ_T structure (section 2.2.2.12) determine whether
the scavenging occurs. Hence, callers to R_WinsDoScanvengingNew SHOULD NOT
treat a return code of ERROR_SUCCESS as indicating a successful scavenging
operation. Instead, callers SHOULD rely on WINS event logs to determine whether
or not the scavenging operation succeeded. The following table lists the events
that indicate the status of scavenging.</p><table><thead>
  <tr>
   <th>
   <p>Event ID</p>
   </th>
   <th>
   <p>Event Name</p>
   </th>
   <th>
   <p>Event Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td colspan="3">
  <p>Informational events</p>
  </td>
 </tr><tr>
  <td>
  <p>4143 </p>
  </td>
  <td>
  <p>WINS_EVT_SCV_RECS</p>
  </td>
  <td>
  <p>WINS scavenged its records in the WINS database. The
  number of records scavenged is listed in the data section.</p>
  </td>
 </tr><tr>
  <td>
  <p>4144 </p>
  </td>
  <td>
  <p>WINS_EVT_SCV_RPLTOMB</p>
  </td>
  <td>
  <p>WINS scavenged replica tombstones in the WINS
  database. The number of records Scavenged is in the data section.</p>
  </td>
 </tr><tr>
  <td>
  <p>4247 </p>
  </td>
  <td>
  <p>WINS_EVT_SCV_EXC</p>
  </td>
  <td>
  <p>The WINS Scavenger thread encountered an error.</p>
  </td>
 </tr><tr>
  <td>
  <p>4250 </p>
  </td>
  <td>
  <p>WINS_EVT_SCV_ERR</p>
  </td>
  <td>
  <p>The WINS Scavenger thread could not scavenge a record.
  This record is ignored and the Scavenger continues to the next available
  record. Check the application log for the Exchange component, ESENT.</p>
  </td>
 </tr><tr>
  <td>
  <p>4269 </p>
  </td>
  <td>
  <p>WINS_EVT_UNABLE_TO_CHG_PRIORITY</p>
  </td>
  <td>
  <p>The Scavenger thread was unable to change its priority
  level.</p>
  </td>
 </tr><tr>
  <td>
  <p>4288 </p>
  </td>
  <td>
  <p>WINS_EVT_CLEANUP_OWNADDTBL_EXC</p>
  </td>
  <td>
  <p>The Scavenger thread encountered an error while
  cleaning up the owner-address table. It will try again after the Verify
  interval has elapsed.</p>
  </td>
 </tr><tr>
  <td>
  <p>4328 </p>
  </td>
  <td>
  <p>WINS_EVT_ADMIN_SCVENGING_INITIATED</p>
  </td>
  <td>
  <p>Administrator &#39;%1&#39; has initiated a scavenging
  operation.</p>
  </td>
 </tr><tr>
  <td>
  <p>4329 </p>
  </td>
  <td>
  <p>WINS_EVT_SCVENGING_STARTED</p>
  </td>
  <td>
  <p>The WINS server has started a scavenging operation.</p>
  </td>
 </tr><tr>
  <td>
  <p>4330 </p>
  </td>
  <td>
  <p>WINS_EVT_SCVENGING_COMPLETED</p>
  </td>
  <td>
  <p>The WINS server has completed the scavenging
  operation.</p>
  </td>
 </tr><tr>
  <td>
  <p>5001</p>
  </td>
  <td>
  <p>WINS_EVT_SCV_RANGE</p>
  </td>
  <td>
  <p>WINS is scavenging the locally owned records from the
  database. The version number range that is scavenged is in the data section,
  in the second to fifth words, in this order: from_version_number (low word,
  high word) to_version_number (low word, high word).</p>
  </td>
 </tr><tr>
  <td>
  <p>5002</p>
  </td>
  <td>
  <p>WINS_EVT_SCV_CHUNK</p>
  </td>
  <td>
  <p>WINS is scavenging a chunk of N records in the version
  number range from X to Y. N, X ,and Y (low word, high word for version
  numbers) are listed in the second to sixth words in the data section.</p>
  </td>
 </tr><tr>
  <td colspan="3">
  <p>Warning events</p>
  </td>
 </tr><tr>
  <td>
  <p>4150</p>
  </td>
  <td>
  <p>WINS_EVT_ADJ_TIME_INTVL_R</p>
  </td>
  <td>
  <p>WINS adjusted the scavenging related time interval,
  %1, so that it is compatible with the replication time intervals. The
  adjusted value for this scavenging parameter is given in the data section
  (second DWORD). This value was computed by WINS using an algorithm that MAY
  use the maximum replication time interval specified. The current value
  achieves a balance between consistency of databases across the network of
  WINS servers and the performance of the WINS servers.</p>
  </td>
 </tr><tr>
  <td>
  <p>4151 </p>
  </td>
  <td>
  <p>WINS_EVT_ADJ_TIME_INTVL</p>
  </td>
  <td>
  <p>WINS adjusted the scavenging related time interval,
  %1. The adjusted value for this scavenging parameter is listed in the data
  section (second DWORD). This value was computed by WINS using an algorithm
  that tries to achieve a balance between consistency of databases across the
  network of WINS servers and the performance of the WINS servers.</p>
  </td>
 </tr><tr>
  <td>
  <p>4153</p>
  </td>
  <td>
  <p>WINS_EVT_UNABLE_TO_VERIFY</p>
  </td>
  <td>
  <p>The Scavenger thread found active replicas that needed
  to be verified with the owner WINS server because they were older than the
  verify time interval. The table of owner-to-address mappings indicated the
  WINS was not active.</p>
  </td>
 </tr><tr>
  <td>
  <p>4164</p>
  </td>
  <td>
  <p>WINS_EVT_FORCE_SCV_R_T</p>
  </td>
  <td>
  <p>WINS was forced to scavenge replica tombstones of a
  WINS. The administrator on the computer forced the scavenging using
  winscl.exe. WINS does not scavenge replica tombstones unless they have timed
  out and the WINS has been running for at least three days. This ensures that
  the tombstones have replicated to other WINSes). In this case, the tombstones
  were timed out but the WINS had not been up for three days. The replica
  tombstones were deleted. This deletion does not constitute a problem unless
  the WINS servers are primary andbackup to clients but not both Push and Pull
  partners of each other. If there are such WINSes, there is a low probability
  that this action will result in database inconsistency, but if it does, a
  consistent state can be achieved by initiating consistency checks using
  winscl.exe.</p>
  </td>
 </tr></tbody></table><p>The following requirements and recommendations apply to a
WINS server that processes a call to <a href="e231089b-eb49-40d2-8b62-2b1437e9f98a" data-linktype="relative-path">R_WinsDoScavengingNew</a>:</p><ul><li><p><span><span> 
</span></span>Callers to R_WinsDoScavengingNew SHOULD have control level
access. If an RPC client with a lower access level calls R_WinsDoScavengingNew,
the server SHOULD return ERROR_ACCESS_DENIED.</p>
</li><li><p><span><span> 
</span></span>The WINS server queues a request on the target WINS server for
the scavenging operation, and the method returns immediately with ERROR_SUCCESS
as the status code.</p>
</li></ul></div>