<div class="content"><p align="right"><a href="https://msdn.microsoft.com/en-us/library/95c43206-3a18-4af3-928d-02d2e0c3d6c1" data-linktype="external">msdn link</a></p><p>The <b>DsrAddressToSiteNamesExW</b> method SHOULD<a id="Appendix_A_Target_168"></a><a aria-label="Product behavior note 168" href="0c858a52-732a-43ec-85dd-e44b357c1898#Appendix_A_168" data-linktype="relative-path">&lt;168&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 and subnet
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 DsrAddressToSiteNamesExW(
   [in, unique, string] LOGONSRV_HANDLE ComputerName,
   [in, range(0, 32000)] DWORD EntryCount,
   [in, size_is(EntryCount)] PNL_SOCKET_ADDRESS SocketAddresses,
   [out] PNL_SITE_NAME_EX_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> (defined in
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. To avoid large memory allocations, this number was chosen as a
reasonable limit for the maximum number of socket addresses that this method
accepts.</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="2b40b2eb-480c-42e9-b864-3de716db892d" data-linktype="relative-path">NL_SITE_NAME_EX_ARRAY</a>
structure (section 2.2.1.2.3) that contains an array of site names and an array
of subnet names that correspond to socket addresses in <i>SocketAddresses</i>.
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 SHOULD return one of the following error codes.</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>DsrAddressToSiteNamesExW</b>
  is zero.</p>
  </td>
 </tr></tbody></table><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 and subnet names that
correspond to the <i>SocketAddresses</i> 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>