<div class="content"><p> </p><p>The NetrDfsCreateLocalPartition method marks a share as
being a <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_0b8086c9-d025-45b8-bf09-6b5eca72713e" data-linktype="relative-path">DFS</a></span> share. In
addition, if the <i>RelationInfo</i> parameter is non-NULL, it creates <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_0611e93d-f0e7-42ee-a591-d77ebcbb6619" data-linktype="relative-path">DFS links</a></span>,
as specified in <span><a href="../ms-dfsc/3109f4be-2dbb-42c9-9b8e-0b34f7a2135e" data-linktype="relative-path">[MS-DFSC]</a></span>,
for each of the entries in the <i>RelationInfo</i> parameter. An implementation
MAY<a id="Appendix_A_Target_132"></a><a aria-label="Product behavior note 132" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_132" data-linktype="relative-path">&lt;132&gt;</a> choose to support this
method.</p><dl>
<dd>
<div><pre> NET_API_STATUS NetrDfsCreateLocalPartition(
   [in, string, unique] SRVSVC_HANDLE ServerName,
   [in, string] WCHAR* ShareName,
   [in] GUID* EntryUid,
   [in, string] WCHAR* EntryPrefix,
   [in, string] WCHAR* ShortName,
   [in] LPNET_DFS_ENTRY_ID_CONTAINER RelationInfo,
   [in] int Force
 );
</pre></div>
</dd></dl><p><b>ServerName: </b>An <span><a href="5f8329ee-1965-4ea1-ad35-3b29fbb63232" data-linktype="relative-path">SRVSVC_HANDLE (section 2.2.1.1)</a></span>
pointer that identifies the <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_434b0234-e970-4e8c-bdfa-e16a30d96703" data-linktype="relative-path">server</a></span>. The <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_60e0e1fa-66fe-41e1-b5e3-ceab97e53506" data-linktype="relative-path">client</a></span>
MUST map this structure to an RPC binding handle (see <span><a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a></span> sections
4.3.5 and 5.1.5.2). The server MUST ignore this parameter.</p><p><b>ShareName: </b>A pointer to a null-terminated
UTF-16 string that specifies the name of a local disk share on the server to
add to DFS.</p><p><b>EntryUid: </b>A pointer to a <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a></span>
type that specifies the GUID for this DFS share. The GUID for this share MUST
NOT match a GUID for an existing local partition.<a id="Appendix_A_Target_133"></a><a aria-label="Product behavior note 133" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_133" data-linktype="relative-path">&lt;133&gt;</a></p><p><b>EntryPrefix: </b>A pointer to a null-terminated
UTF-16 string that specifies the path of the DFS share.</p><p><b>ShortName: </b>A pointer to a null-terminated
UTF-16 string that specifies the short-name version (8.3 format) of the <i>EntryPrefix</i>
parameter.</p><p><b>RelationInfo: </b>A pointer to a <span><a href="cfb8c183-826f-4d61-859c-7fe116b0252a" data-linktype="relative-path">NET_DFS_ENTRY_ID_CONTAINER</a></span>
structure. Specifies the DFS child links that are under the DFS share that is
specified by the <i>EntryPrefix</i> parameter.</p><p><b>Force: </b>The <i>Force</i> parameter is ignored
and MUST be set to zero.</p><p><b>Return Values: </b>The method returns 0x00000000
(NERR_Success) to indicate success; otherwise, it returns a nonzero error code.
The method can take 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>.</p><p>In response to a NetrDfsCreateLocalPartition message, the
server SHOULD<a id="Appendix_A_Target_134"></a><a aria-label="Product behavior note 134" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_134" data-linktype="relative-path">&lt;134&gt;</a> choose to perform no
processing and return an implementation-specific error code when this method is
called. If the server supports DFS, the server MAY mark an existing <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_09dbec39-5e75-4d9a-babf-1c9f1d499625" data-linktype="relative-path">SMB</a></span>
file share as a DFS share that enables it to be accessed by using DFS, as
specified in [MS-DFSC].</p><p>The <i>ShareName</i> parameter MUST specify the name of an
existing SMB file share of type STYPE_DISKTREE (for more information, see <span><a href="6069f8c0-c93f-43a0-a5b4-7ed447eb4b84" data-linktype="relative-path">Share
Types (section 2.2.2.4)</a></span>), or the server MUST fail the call
with an ERROR_BAD_NET_NAME error code if the share is not present. If the share
is present, but not of type STYPE_DISKTREE, it MUST fail with an
ERROR_BAD_DEV_TYPE error code.</p><p>The <i>EntryUid</i> parameter specifies the GUID that the
server MUST assign to the new DFS share.</p><p>This parameter MUST NOT be NULL, or the server MUST fail the
call with an ERROR_INVALID_PARAMETER error code. If the <i>EntryUid</i>
parameter matches a GUID for an existing local partition, the server MUST fail
the call with an ERROR_INVALID_PARAMETER error code.</p><p>The <i>EntryPrefix</i> parameter specifies the path of the
DFS share. This string MUST be in one of the following two forms:</p><ul><li><p><span><span> 
</span></span>The first form is \Dfsname\sharename, where <i>Dfsname</i> is the
name of the storage server that hosts the root of a <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_07f90715-4bf2-479d-9c9d-1b2cd585a280" data-linktype="relative-path">standalone DFS implementation</a></span>;
and <i>sharename</i> is the name of a shared folder that is published on the
DFS host server.</p>
</li><li><p><span><span> 
</span></span>The second form is \DomainName\DomDfsname, where <i>DomainName</i>
is the name of the domain that hosts the <span><a href="1709f6a7-efb8-4ded-b7ae-5cee9ee36320#gt_639b7503-b879-4ef7-98a8-14adf85bc16d" data-linktype="relative-path">DFS root</a></span>; and <i>DomDfsname</i>
is the name of the root of a domain-based DFS implementation that is published
in the directory service of the domain.</p>
</li></ul><p>The <i>RelationInfo</i> parameter specifies the DFS child
links to create under the share that is specified by <i>EntryPrefix</i>. It has
a member count that specifies the number of child links and a Buffer member
that is an array of the Count structure of type <span><a href="8a60a434-7ea6-4000-ae4f-17d8f60870b5" data-linktype="relative-path">NET_DFS_ENTRY_ID</a></span>. A
DFS child link MUST be created for each entry in the Buffer. The <i>RelationInfo</i>
parameter MUST not be NULL, or the server MUST fail the call with an
ERROR_INVALID_PARAMETER error code.</p><p>The <i>ShortName</i> parameter specifies a share name (in
the 8.3 format) that is specified by <i>EntryPrefix</i> and MUST be interpreted
by the server in an implementation-specific manner.<a id="Appendix_A_Target_135"></a><a aria-label="Product behavior note 135" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_135" data-linktype="relative-path">&lt;135&gt;</a></p><p>The <i>Force</i> parameter is ignored and MUST be zero.</p><p>The server MAY<a id="Appendix_A_Target_136"></a><a aria-label="Product behavior note 136" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_136" data-linktype="relative-path">&lt;136&gt;</a>
enforce security measures to verify that the caller has the required
permissions to execute this call. If the server enforces these security
measures and the caller does not have the required credentials, the server
SHOULD<a id="Appendix_A_Target_137"></a><a aria-label="Product behavior note 137" href="ebb74ff2-abb1-4e1b-a76a-563a5cbbea9a#Appendix_A_137" data-linktype="relative-path">&lt;137&gt;</a> fail the call.</p></div>