<div class="content" name="NetrDfsAddStdRootForced" uuid="7463fdb0-db6a-4792-834d-10c76a2c48bc"><p>The NetrDfsAddStdRootForced (Opnum 15) method creates a new <a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_701a2cc1-eb5a-400f-b394-5bad264ec8f6" data-linktype="relative-path">stand-alone DFS namespace</a>
without checking for the availability and accessibility of the specified <a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_a49a79ea-dac7-4016-9a84-cf87161db7e3" data-linktype="relative-path">share</a>.<a id="Appendix_A_Target_123"></a><a aria-label="Product behavior note 123" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_123" data-linktype="relative-path">&lt;123&gt;</a><a id="Appendix_A_Target_124"></a><a aria-label="Product behavior note 124" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_124" data-linktype="relative-path">&lt;124&gt;</a><a id="Appendix_A_Target_125"></a><a aria-label="Product behavior note 125" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_125" data-linktype="relative-path">&lt;125&gt;</a></p><p>The NetrDfsAddStdRootForced method uses the following <a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_9c5903c1-1477-4181-b451-3ba1e34a0c0c" data-linktype="relative-path">MIDL</a> syntax.</p><dl>
<dd>
<div><pre> NET_API_STATUS NetrDfsAddStdRootForced(
   [in, string] WCHAR* ServerName,
   [in, string] WCHAR* RootShare,
   [in, string] WCHAR* Comment,
   [in, string] WCHAR* Share
 );
</pre></div>
</dd></dl><p><b>ServerName: </b>The pointer to a null-terminated <a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_c305d0ab-8b94-461a-bd76-13b40cb8c4d8" data-linktype="relative-path">Unicode</a> string. This is the
host name of the new <a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_ac90b498-3ba4-48d6-bcd6-5495f1654671" data-linktype="relative-path">DFS
root target</a>.</p><p><b>RootShare: </b>The pointer to a null-terminated
Unicode DFS root target <a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_3c179f10-1793-4268-96eb-de4d85a32060" data-linktype="relative-path">share
name</a> string. This is also the <a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_76c9958a-125f-41b6-ae65-6663f270f873" data-linktype="relative-path">DFS namespace name</a>. This
method does not create the share; it MUST be created separately.</p><p><b>Comment: </b>The pointer to a null-terminated
Unicode string that contains a comment associated with the <a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_6a3f0be9-b9b4-49df-9d1c-a3b89e4e9890" data-linktype="relative-path">DFS namespace</a>. Used for
informational purposes, this string has no protocol-specified restrictions on
length or content. The comment is meant for human consumption and does not
affect server functionality. This parameter MAY be a NULL pointer.</p><p><b>Share: </b> The pointer to a null-terminated
Unicode string that contains the local <a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_528b06a4-e67c-43b3-a02d-8738858a691d" data-linktype="relative-path">file system</a> path
corresponding to the share on the server receiving the <a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_8a7f6700-8311-45bc-af10-82e10accd331" data-linktype="relative-path">RPC</a> method, in the
following form:</p><dl>
<dd>
<dl>
<dd>
<div><pre> &lt;X&gt;:\&lt;path&gt;
  
</pre></div>
</dd></dl></dd>
<dd>
<p>where <i>&lt;X&gt;</i> is a drive
letter (a single character from A to Z) and <i>&lt;path&gt;</i> is a file
system path whose leaf component is a directory.</p>
</dd></dl><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 <a href="../ms-erref/1bc92ddf-b79e-413c-bbaa-99a5281a6c90" data-linktype="relative-path">[MS-ERREF]</a>
section <a href="../ms-erref/18d8fbe8-a967-4f1c-ae50-99ca8e491d2d" data-linktype="relative-path">2.2</a>.
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>0x00000000 ERROR_SUCCESS</td>
  <td>Successful completion.</td>
 </tr><tr>
  <td>0x00000005 ERROR_ACCESS_DENIED</td>
  <td>Permission to perform the operation was denied.</td>
 </tr><tr>
  <td>0x000000B7 ERROR_ALREADY_EXISTS</td>
  <td>The DFS namespace that the ServerName and RootShare parameters specify already exists.</td>
 </tr></tbody></table>
</dd></dl><p>The support for this method is optional. If supported, then
the server MUST support the ability to create a DFS namespace even when the
share that the <i>RootShare</i> parameter specifies is not available or
accessible.</p><p>On receiving this method, the server MUST do the following.</p><ul><li><p><span><span> 
</span></span>If there is any entry in the <b>NamespaceList</b> with the <b>NamespaceName</b>
matching <i>RootShare</i>, then the RPC method MUST fail with
ERROR_ALREADY_EXISTS (0x000000B7).</p>
</li><li><p><span><span> 
</span></span>Create and initialize the <b>Namespace</b> object, as specified
in section <a href="b18ef17a-7a9c-4e22-b1bf-6a4d07e87b2d" data-linktype="relative-path">3.1.4.4.1</a>,
and insert it into the <b>NamespaceList</b>. </p>
</li><li><p><span><span> 
</span></span>The server MUST synchronously insert the <b>Namespace</b> object
into the local information store.</p>
</li></ul></div>