<div class="content"><p> </p><p>The NetrDfsGetDcAddress (Opnum 16) method returns the <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_76a05049-3531-4abd-aec8-30e19954b4bd" data-linktype="relative-path">DC</a></span>
host name that is used by the <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_3de8e640-501a-4b25-80a7-0ba769f3c0b9" data-linktype="relative-path">DFS server</a></span> to which
the <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a></span>
method is issued.<a id="Appendix_A_Target_126"></a><a aria-label="Product behavior note 126" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_126" data-linktype="relative-path">&lt;126&gt;</a> The client MUST use this DC
to create a <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_133ab305-ad75-4b38-8ec9-40bc0dc3b594" data-linktype="relative-path">domain-based DFS namespace</a></span>,
add a root target to a domain-based DFS namespace, remove a root target from a
domain-based DFS namespace, or remove a domain-based DFS namespace. </p><p>The NetrDfsGetDcAddress method uses the following <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_9c5903c1-1477-4181-b451-3ba1e34a0c0c" data-linktype="relative-path">MIDL</a></span>
syntax.</p><dl>
<dd>
<div><pre> NET_API_STATUS NetrDfsGetDcAddress(
   [in, string] WCHAR* ServerName,
   [in, out, string] WCHAR** DcName,
   [in, out] BOOLEAN* IsRoot,
   [in, out] unsigned long* Timeout
 );
</pre></div>
</dd></dl><p><b>ServerName: </b>A pointer to a null-terminated <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_c305d0ab-8b94-461a-bd76-13b40cb8c4d8" data-linktype="relative-path">Unicode</a></span>
string. This is the <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_fe6fd875-b30a-44bb-850e-10733990f04c" data-linktype="relative-path">host name</a></span> of the
server to which the RPC method is issued.<a id="Appendix_A_Target_127"></a><a aria-label="Product behavior note 127" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_127" data-linktype="relative-path">&lt;127&gt;</a></p><p><b>DcName: </b>A null-terminated Unicode string that
contains the DC host name when the NetrDfsGetDcAddress method is successful.<a id="Appendix_A_Target_128"></a><a aria-label="Product behavior note 128" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_128" data-linktype="relative-path">&lt;128&gt;</a></p><p><b>IsRoot: </b>A pointer to a Boolean value, set to
TRUE on return if the server hosts any <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_ac90b498-3ba4-48d6-bcd6-5495f1654671" data-linktype="relative-path">DFS root target</a></span>, and
FALSE otherwise.<a id="Appendix_A_Target_129"></a><a aria-label="Product behavior note 129" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_129" data-linktype="relative-path">&lt;129&gt;</a></p><p><b>Timeout: </b>A pointer to an unsigned 32-bit
integer value indicating the count of seconds for which the server will use the
DC that is returned to access <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_e8de88fd-d760-46fa-ad77-76961fa20aea" data-linktype="relative-path">DFS metadata</a></span>.<a id="Appendix_A_Target_130"></a><a aria-label="Product behavior note 130" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_130" data-linktype="relative-path">&lt;130&gt;</a></p><p><b>Return Values: </b>The method MUST return 0 on
success and a nonzero error code on failure. The method can return any specific
error code value, 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>.
The most common error codes are listed in the following table.</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>Successful completion.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>A server MAY<a id="Appendix_A_Target_131"></a><a aria-label="Product behavior note 131" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_131" data-linktype="relative-path">&lt;131&gt;</a>
implement this method if it supports <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_c37de1c8-4bd3-406f-ad8c-50c877666f91" data-linktype="relative-path">domain-based DFS namespaces</a></span>.</p><p>In the <i>DcName</i> parameter, the server SHOULD return the
host name of the DC it is using to access DFS metadata for any domain-based DFS
namespace that the server is hosting. If the server is not currently using a
DC, it MUST determine a DC and return its name.</p><p>The server SHOULD also return a time-out value, in seconds,
that is equal to the length of time that the server will be using the DC in the
<i>Timeout</i> parameter, assuming that another RPC method does not change it.</p><p>The server uses the <i>IsRoot</i> parameter to specify
whether it supports the ability to host more than one <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_6a3f0be9-b9b4-49df-9d1c-a3b89e4e9890" data-linktype="relative-path">DFS namespace</a></span>, and
to indicate whether it is currently hosting a DFS namespace. If the server
supports the ability to host more than one DFS namespace, it MUST return a
value of FALSE in the <i>IsRoot</i> parameter, regardless of whether it is
actually hosting a DFS namespace. If the server does not support the ability to
host more than one DFS namespace, and if it currently hosts a DFS namespace, it
SHOULD return a value of TRUE in the <i>IsRoot</i> parameter; otherwise, it
SHOULD return FALSE.</p></div>