<div class="content"><p align="right"><a href="https://msdn.microsoft.com/en-us/library/0731ce2e-fde2-405c-b7d7-c9012df9d718" data-linktype="external">msdn link</a></p><p>The <b>DsrAddressToSiteNamesW</b> method SHOULD<a id="Appendix_A_Target_167"></a><a aria-label="Product behavior note 167" href="0c858a52-732a-43ec-85dd-e44b357c1898#Appendix_A_167" data-linktype="relative-path">&lt;167&gt;</a> translate a list of socket
addresses into their corresponding <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_8abdc986-5679-42d9-ad76-b11eb5a0daba" data-linktype="relative-path">site</a> names. For details
about the mapping from socket address to subnet/site name, see <a href="../ms-adts/d2435927-0999-4c62-8c6d-13ba31a52e1a" data-linktype="relative-path">[MS-ADTS]</a>
sections <a href="../ms-adts/cdacdd51-f324-41e9-b83f-71263902dabe" data-linktype="relative-path">6.1.1.2.2.1</a>
and <a href="../ms-adts/448970b1-1778-4569-9bb3-3bbaa86ad7df" data-linktype="relative-path">6.1.1.2.2.2</a>.
</p><dl>
<dd>
<div><pre> NET_API_STATUS DsrAddressToSiteNamesW(
   [in, unique, string] LOGONSRV_HANDLE ComputerName,
   [in, range(0, 32000)] DWORD EntryCount,
   [in, size_is(EntryCount)] PNL_SOCKET_ADDRESS SocketAddresses,
   [out] PNL_SITE_NAME_ARRAY* SiteNames
 );
</pre></div>
</dd></dl><p><b>ComputerName: </b>The custom <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_44deb72d-c62b-4335-90e4-b9fd4dd782ed" data-linktype="relative-path">binding handle</a> (section <a href="3b224201-b531-43e2-8c79-b61f6dea8640" data-linktype="relative-path">3.5.4.1</a>) that represents
the connection to a <a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_76a05049-3531-4abd-aec8-30e19954b4bd" data-linktype="relative-path">domain
controller</a>.</p><p><b>EntryCount: </b>The number of socket addresses
specified in <i>SocketAddresses</i>. The maximum value for <i>EntryCount</i> is
32000. The limit was chosen to prevent clients from being able to force large
memory allocations on servers.</p><p><b>SocketAddresses: </b>An array of <a href="235d0c09-b9db-44c5-9d4d-806919be657b" data-linktype="relative-path">NL_SOCKET_ADDRESS</a>
structures (section 2.2.1.2.4) that contains socket addresses to translate. The
number of addresses specified MUST be equal to <i>EntryCount</i>.</p><p><b>SiteNames: </b>A pointer to an <a href="4c5fb44a-6d68-420d-970e-68ad5436bbd3" data-linktype="relative-path">NL_SITE_NAME_ARRAY</a>
structure (section 2.2.1.2.2) that contains a corresponding array of site
names. The number of entries returned is equal to <i>EntryCount</i>. The fields
of an entry are set to zero if the corresponding socket address does not map to
any site, or if the address family of the socket address is not IPV4 or IPV6.
The mapping of IP addresses to sites is specified in [MS-ADTS] section
6.1.1.2.2.1.</p><p><b>Return Values: </b>The method returns 0x00000000
on success; otherwise, it returns a nonzero error code.</p><table><thead>
  <tr>
   <th>
   <p>Return Value/Code</p>
   </th>
   <th>
   <p>Description</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>0x00000008</p>
  <p>ERROR_NOT_ENOUGH_MEMORY</p>
  </td>
  <td>
  <p>Not enough storage is available to process this
  command.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000057</p>
  <p>ERROR_INVALID_PARAMETER</p>
  </td>
  <td>
  <p>One of the parameters is invalid. This error value is
  returned if the value of <i>EntryCount</i> passed to <b>DsrAddressToSiteNamesW</b>
  is zero.</p>
  </td>
 </tr></tbody></table><dl>
<dd>
<p> </p>
</dd></dl><p>This method returns errors based on Common Error Processing
Rule A, specified in section <a href="2d776bfc-e81f-4c8f-9da8-4c2920f65413" data-linktype="relative-path">3</a>.</p><p>The server MUST return the site names that correspond to the
<i>SocketAddresses</i> parameter by using the method specified for IP address
and site/subnet mapping ([MS-ADTS] section <a href="../ms-adts/255d4630-f033-4289-8db6-c36060b47e17" data-linktype="relative-path">6.1.1.2.2.2.1</a>).</p></div>