<div class="content" name="R_WinsGetBrowserNames" uuid="276160bd-6179-4a91-8262-74e5d44e3ce1"><p>The R_WinsGetBrowserNames method retrieves <a href="a83205a2-23e2-41bb-84e1-4d968aaae4e8#gt_8a328071-e088-4f7e-9d28-ff81d8fb1104" data-linktype="relative-path">browser name</a> records from
the <a href="a83205a2-23e2-41bb-84e1-4d968aaae4e8#gt_cb0d3fc4-7e24-49af-82c4-91a35bca857f" data-linktype="relative-path">target WINS server</a>
database. </p><dl>
<dd>
<div><pre> DWORD R_WinsGetBrowserNames(
   [in, ref] WINSIF_HANDLE ServerHdl,
   [out] PWINSINTF_BROWSER_NAMES_T pNames
 );
</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_f2f9c250-6c9e-445f-b677-376f23f77d87" data-linktype="relative-path">WINS
server</a>. RPC uses this binding internally to determine which WINS server the
call is directed to. See <a href="https://go.microsoft.com/fwlink/?LinkId=205437" data-linktype="external">[MSDN-Handles]</a> for
more information.</p><dl>
<dd>
<p>This value MUST be ignored by the WINS server on
receipt.</p>
</dd></dl><p><b>pNames: </b>A pointer to a structure of type <a href="84ea4833-e6d8-4896-9e24-305d6cbbe778" data-linktype="relative-path">WINSINTF_BROWSER_NAMES_T (section 2.2.2.10)</a>,
which contains the browser name records retrieved from the target WINS server.</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 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>0x00000000 ERROR_SUCCESS</td>
  <td>The call was successful.</td>
 </tr><tr>
  <td>0x00000FA0 ERROR_WINS_INTERNAL</td>
  <td>An error occurred while processing the RPC call.</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>Clients with any access level can call this method.</p><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_WinsGetBrowserNames</a>:</p><ul><li><p><span><span> 
</span></span>This method retrieves all browser name records in the target WINS
server database.</p>
</li><li><p><span><span> 
</span></span>If the <b>Browser name cache</b> abstract data element (section <a href="9b552c40-d2a3-424b-90b5-0efe83166e71" data-linktype="relative-path">3.1.1</a>) has been populated,
and less than 3 minutes have elapsed since it was last updated, this method
SHOULD return the records from the cache by using the <i>pNames</i> parameter. </p>
</li><li><p><span><span> 
</span></span>If this method call is being made for the first time, or if 3
minutes or more have elapsed since the <b>Browser name cache</b> was last
updated, the cache SHOULD be refreshed by fetching records from the database,
and the contents of the cache are returned.</p>
</li><li><p><span><span> 
</span></span>If any error occurs while retrieving the records, the service
SHOULD return an ERROR_WINS_INTERNAL error code.</p>
</li></ul><p>The R_WinsGetBrowserNames caller is responsible for freeing
the memory pointed to by <i>pRecs-&gt;pRow-&gt;pName</i> and <i>pRecs-&gt;pRow-&gt;pAdd</i>
for each record, then using the <b>midl_user_free</b> function (section <a href="571bb9e9-1416-426a-8a2e-e5be5d4a9002" data-linktype="relative-path">3</a>) to free the <i>pRecs-&gt;pRow</i>
and <i>pRecs</i> pointers themselves.</p></div>