<div class="content"><p> </p><p>The NetrDfsGetInfo method returns information about a <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_639b7503-b879-4ef7-98a8-14adf85bc16d" data-linktype="relative-path">DFS root</a></span>
or a <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_0611e93d-f0e7-42ee-a591-d77ebcbb6619" data-linktype="relative-path">DFS
link</a></span> of the specified <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_6a3f0be9-b9b4-49df-9d1c-a3b89e4e9890" data-linktype="relative-path">DFS namespace</a></span>. </p><p>The NetrDfsGetInfo method has 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 NetrDfsGetInfo(
   [in, string] WCHAR* DfsEntryPath,
   [in, unique, string] WCHAR* ServerName,
   [in, unique, string] WCHAR* ShareName,
   [in] DWORD Level,
   [out, switch_is(Level)] DFS_INFO_STRUCT* DfsInfo
 );
</pre></div>
</dd></dl><p><b>DfsEntryPath:</b> The pointer to a DFS root or a
DFS link path.</p><p><b>ServerName: </b>This parameter MUST be a NULL
pointer for Level_50 and MUST be ignored for other levels.</p><p><b>ShareName: </b>This parameter MUST be a NULL
pointer for Level_50 and MUST be ignored for other levels.</p><p><b>Level: </b>This parameter specifies the
information level of the data and, in turn, determines the action the method
performs. </p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>Level_1</p>
  <p>0x00000001</p>
  </td>
  <td>
  <p>Returns the name of the DFS root or the DFS link.</p>
  </td>
 </tr><tr>
  <td>
  <p>Level_2</p>
  <p>0x00000002</p>
  </td>
  <td>
  <p>Returns the name, comment, state, and number of
  targets for the DFS root or the DFS link.</p>
  </td>
 </tr><tr>
  <td>
  <p>Level_3</p>
  <p>0x00000003</p>
  </td>
  <td>
  <p>Returns the name, comment, state, number of targets,
  and target information for the DFS root or the DFS link.</p>
  </td>
 </tr><tr>
  <td>
  <p>Level_4</p>
  <p>0x00000004</p>
  </td>
  <td>
  <p>Returns the name, comment, state, time-out, <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_f49694cc-c350-462d-ab8e-816f0103c6c1" data-linktype="relative-path">GUID</a></span>,
  number of targets, and target information for the DFS root or the DFS link.</p>
  </td>
 </tr><tr>
  <td>
  <p>Level_5</p>
  <p>0x00000005</p>
  </td>
  <td>
  <p>Returns the name, comment, state, time-out, GUID,
  property flags, metadata size, and number of targets for the DFS root or the
  DFS link.</p>
  </td>
 </tr><tr>
  <td>
  <p>Level_6</p>
  <p>0x00000006</p>
  </td>
  <td>
  <p>Returns the name, comment, state, GUID, time-out,
  property flags, metadata size, number of targets, and target information for
  the DFS root or the DFS link.</p>
  </td>
 </tr><tr>
  <td>
  <p>Level_7</p>
  <p>0x00000007</p>
  </td>
  <td>
  <p>Returns the version number GUID of the <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_e8de88fd-d760-46fa-ad77-76961fa20aea" data-linktype="relative-path">DFS
  metadata</a></span>. This value only applies to the DFS root.</p>
  </td>
 </tr><tr>
  <td>
  <p>Level_8</p>
  <p>0x00000008</p>
  </td>
  <td>
  <p>Returns the name, comment, state, time-out, GUID, property
  flags, metadata size, number of targets, and security descriptor associated
  with the DFS root or the DFS link.</p>
  <p>Only <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_ce6af522-ba70-4ba1-a684-b98b809c72ad" data-linktype="relative-path">stand-alone DFS namespaces</a></span>
  and <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_8099f7c1-2a31-4a20-81e6-824689bd9c5a" data-linktype="relative-path">domainv2-based DFS namespaces</a></span>
  are supported.</p>
  </td>
 </tr><tr>
  <td>
  <p>Level_9</p>
  <p>0x00000009</p>
  </td>
  <td>
  <p>Returns the name, comment, state, GUID, time-out,
  property flags, metadata size, number of targets, list of targets, and
  security descriptor for the DFS root or the DFS link. </p>
  <p>Only stand-alone DFS namespaces and domainv2-based DFS
  namespaces are supported.</p>
  </td>
 </tr><tr>
  <td>
  <p>Level_50</p>
  <p>0x00000032</p>
  </td>
  <td>
  <p>Returns the DFS metadata version and capability
  information of an existing DFS namespace. This level is valid only for the
  DFS namespace root, not for DFS links. The <i>ServerName</i> and <i>ShareName</i>
  parameters MUST both be NULL.<a id="Appendix_A_Target_58"></a><a aria-label="Product behavior note 58" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_58" data-linktype="relative-path">&lt;58&gt;</a></p>
  </td>
 </tr><tr>
  <td>
  <p>Level_100</p>
  <p>0x00000064</p>
  </td>
  <td>
  <p>Returns the comment associated with the root or DFS
  link specified in the <i>DfsEntryPath</i> parameter.</p>
  </td>
 </tr><tr>
  <td>
  <p>Level_150</p>
  <p>0x00000096</p>
  </td>
  <td>
  <p>Returns the security descriptor associated with a DFS
  link.</p>
  <p>Only stand-alone DFS namespaces and domainv2-based DFS
  namespaces are supported.</p>
  </td>
 </tr></tbody></table>
</dd>
<dd>
<p>The server MUST support Level values 1-3 and 100.
The server SHOULD support Level values 4-9, 50 and 150. If the server does not
support the provided Level, it MUST fail the call.<a id="Appendix_A_Target_59"></a><a aria-label="Product behavior note 59" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_59" data-linktype="relative-path">&lt;59&gt;</a> The
server SHOULD return error code ERROR_INVALID_PARAMETER for unsupported Level
values.<a id="Appendix_A_Target_60"></a><a aria-label="Product behavior note 60" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_60" data-linktype="relative-path">&lt;60&gt;</a></p>
</dd></dl><p><b>DfsInfo: </b>The pointer to a <span><a href="725240d3-2da7-41ef-8161-b7df1c2af497" data-linktype="relative-path">DFS_INFO_STRUCT</a></span>
union to receive the returned information. The case of the union is selected by
the value of the <i>Level</i> parameter.</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><tr>
  <td>
  <p>0x00000032</p>
  <p>ERROR_NOT_SUPPORTED</p>
  </td>
  <td>
  <p>The specified operation is not supported.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000057</p>
  <p>ERROR_INVALID_PARAMETER</p>
  </td>
  <td>
  <p>An incorrect parameter was specified.</p>
  </td>
 </tr><tr>
  <td>
  <p>0x00000490</p>
  <p>ERROR_NOT_FOUND</p>
  </td>
  <td>
  <p>The specified DFS root or DFS link, or DFS link or
  root target does not exist.</p>
  </td>
 </tr></tbody></table>
</dd></dl><p>The server MUST verify the existence of the DFS namespace
that the <i>DfsEntryPath</i> parameter specifies. If the namespace does not
exist, the server MUST return ERROR_NOT_FOUND.</p><p>The server MUST verify the existence of the DFS link that the
<i>DfsEntryPath</i> parameter specifies. If that existence check fails, the
server MUST return ERROR_NOT_FOUND.</p><table><thead>
  <tr>
   <th>
   <p>Value </p>
   </th>
   <th>
   <p>DFS metadata field </p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>1</p>
  <p>(0x00000001)</p>
  </td>
  <td>
  <p>The <b>Prefix</b> field of <b>NamespaceElement</b>.</p>
  </td>
 </tr><tr>
  <td>
  <p>2</p>
  <p>(0x00000002)</p>
  </td>
  <td>
  <p>In addition to those for Level 1: the <b>Comment</b>
  and <b>State</b> fields of <b>NamespaceElement</b> and the <b>TargetCount</b>
  field of <b>TargetsList</b>.</p>
  </td>
 </tr><tr>
  <td>
  <p>3</p>
  <p>(0x00000003)</p>
  </td>
  <td>
  <p>In addition to those for Level 2: <b>Target</b>
  entries in the <b>TargetsList</b>.</p>
  </td>
 </tr><tr>
  <td>
  <p>4</p>
  <p>(0x00000004)</p>
  </td>
  <td>
  <p>In addition to those for Level 3: the <b>ReferralTTL</b>
  and <b>IdentityGUID</b> fields of <b>NamespaceElement</b>.</p>
  </td>
 </tr><tr>
  <td>
  <p>5</p>
  <p>(0x00000005)</p>
  </td>
  <td>
  <p>In addition to those for Level 4: the <b>Properties</b>
  field of <b>NamespaceElement</b>, and the size of the DFS namespace metadata,<a id="Appendix_A_Target_61"></a><a aria-label="Product behavior note 61" href="3a466440-1ef6-4439-b4e2-be9eaddeb511#Appendix_A_61" data-linktype="relative-path">&lt;61&gt;</a> but excluding <b>Target</b>
  entries.</p>
  </td>
 </tr><tr>
  <td>
  <p>6</p>
  <p>(0x00000006)</p>
  </td>
  <td>
  <p>In addition to those for Level 5: <b>Target</b>
  entries in the <b>TargetsList</b>.</p>
  </td>
 </tr><tr>
  <td>
  <p>7</p>
  <p>(0x00000007)</p>
  </td>
  <td>
  <p>The value of <b>GenerationGUID</b> attribute of the <b>Namespace</b>
  object.</p>
  </td>
 </tr><tr>
  <td>
  <p>8</p>
  <p>(0x00000008)</p>
  </td>
  <td>
  <p>In addition to those for Level 5: <b>SecurityDescriptor</b>
  of the <b>NamespaceElement</b>.</p>
  </td>
 </tr><tr>
  <td>
  <p>9</p>
  <p>(0x00000009)</p>
  </td>
  <td>
  <p>In addition to those for Level 6: <b>SecurityDescriptor</b>
  of the <b>NamespaceElement</b>.</p>
  </td>
 </tr><tr>
  <td>
  <p>50</p>
  <p>(0x00000032)</p>
  </td>
  <td>
  <p>No metadata attribute stores this data. The value
  returned MUST, however, be one of the values defined in the table in section <span><a href="58eac12a-622f-44d6-bcd2-01b0e98c5139" data-linktype="relative-path">2.2.3.10</a></span>.</p>
  </td>
 </tr><tr>
  <td>
  <p>100</p>
  <p>(0x00000064)</p>
  </td>
  <td>
  <p><b>Comment</b> in <b>NamespaceElement</b>.</p>
  </td>
 </tr><tr>
  <td>
  <p>150</p>
  <p>(0x00000096)</p>
  </td>
  <td>
  <p><b>SecurityDescriptor</b> of the <b>NamespaceElement</b>.</p>
  </td>
 </tr></tbody></table><p> For a standalone DFS namespace, the server MUST identify a
consistent GUID for the specified DFS link or DFS root path. This value MUST
conform to the expectations of <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_c4813fc3-b2e5-4aa3-bde7-421d950d68d3" data-linktype="relative-path">UUID</a></span> uniqueness
provided by <span><a href="https://go.microsoft.com/fwlink/?LinkId=90460" data-linktype="external">[RFC4122]</a></span> or <span><a href="https://go.microsoft.com/fwlink/?LinkId=89824" data-linktype="external">[C706]</a></span>,
though those specific algorithms are not required. This GUID value MUST be used
when responding to calls specifying a <i>Level</i> parameter whose
corresponding return structure provides the GUID: values of 4, 5, 6, 8, or 9.</p><p>The server MUST use the following fields in the DFS metadata
for a stand-alone DFS namespace to return the required information, depending
on the value of the <i>Level</i> parameter.</p><p>The server MUST use the following fields in the DFS metadata
for a <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_2aad5e61-ffe9-406e-a192-328c5327ee72" data-linktype="relative-path">domainv1-based DFS namespace</a></span>
to return the required information, depending on the value of the <i>Level</i>
parameter.</p><table><thead>
  <tr>
   <th>
   <p>Value </p>
   </th>
   <th>
   <p>DFS metadata field </p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>1</p>
  <p>(0x00000001)</p>
  </td>
  <td>
  <p>The <b>PrefixSize</b> and <b>Prefix</b> fields of <span><a href="4ccdd530-9696-4572-968f-27d689b33999" data-linktype="relative-path">DFSRootOrLinkIDBLOB</a></span>.</p>
  </td>
 </tr><tr>
  <td>
  <p>2</p>
  <p>(0x00000002)</p>
  </td>
  <td>
  <p>In addition to those for Level 1: the <b>CommentSize</b>,
  <b>Comment</b>, and <b>State</b> fields of DFSRootOrLinkIDBLOB and the <b>TargetCount</b>
  field of <span><a href="0e4aa671-ba82-4645-a259-94fe7b04086b" data-linktype="relative-path">DFSTargetListBLOB</a></span>.</p>
  </td>
 </tr><tr>
  <td>
  <p>3</p>
  <p>(0x00000003)</p>
  </td>
  <td>
  <p>In addition to those for Level 2: <span><a href="c914cbbc-eb6f-4843-b344-f20dd0619853" data-linktype="relative-path">TargetEntryBLOB</a></span>.</p>
  </td>
 </tr><tr>
  <td>
  <p>4</p>
  <p>(0x00000004)</p>
  </td>
  <td>
  <p>In addition to those for Level 3: the <b>ReferralTTL</b>
  field of <span><a href="9f18db22-cfcc-429f-88eb-364a5ae7482c" data-linktype="relative-path">DFSNamespaceRootBLOB</a></span>
  or DFSNamespaceLinkBLOB; the <b>RootOrLinkGuid</b> field of
  DFSRootOrLinkIDBLOB.</p>
  </td>
 </tr><tr>
  <td>
  <p>5</p>
  <p>(0x00000005)</p>
  </td>
  <td>
  <p>In addition to those for Level 4: the <b>RootOrLinkGuid</b>
  field of DFSRootOrLinkIDBLOB, the <b>Type</b> field of DFSRootOrLinkIDBLOB,
  and the <b>Size</b> field of the value stored in the <b>pKT</b> attribute of
  the DFS namespace&#39;s <span><a href="a9bc4403-a862-48b9-b99b-1b44a887d177#gt_8bb43a65-7a8c-4585-a7ed-23044772f8ca" data-linktype="relative-path">object</a></span>, but
  excluding TargetEntryBLOB.</p>
  </td>
 </tr><tr>
  <td>
  <p>6</p>
  <p>(0x00000006)</p>
  </td>
  <td>
  <p>In addition to those for Level 5: TargetEntryBLOB.</p>
  </td>
 </tr><tr>
  <td>
  <p>7</p>
  <p>(0x00000007)</p>
  </td>
  <td>
  <p>The Value of <b>pKTGuid</b> attribute of the DFS
  namespace&#39;s object.</p>
  </td>
 </tr><tr>
  <td>
  <p>50</p>
  <p>(0x00000032)</p>
  </td>
  <td>
  <p>No metadata attribute stores this data. The value
  returned MUST, however, be one of the values defined in the table in section
  2.2.3.10.</p>
  </td>
 </tr><tr>
  <td>
  <p>100</p>
  <p>(0x00000064)</p>
  </td>
  <td>
  <p><b>CommentSize</b> and <b>Comment</b> in
  DFSRootOrLinkIDBLOB, and BLOBDataSize of DFSNamespaceLinkBLOB.</p>
  </td>
 </tr></tbody></table><p>Note that for interoperability, all root targets of a
namespace SHOULD use the same encoding for this <b>TargetTimestamp</b> field,
as specified in section 2.3.3.1.1.3.1.</p><p>The server MUST use the following fields in the DFS metadata
for a domainv2-based DFS namespace to return the required information,
depending on the value of the <i>Level</i> parameter.</p><table><thead>
  <tr>
   <th>
   <p>Value </p>
   </th>
   <th>
   <p>DFS metadata field </p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>1</p>
  <p>(0x00000001)</p>
  </td>
  <td>
  <p>The <b>msDFS-LinkPathv2</b> attribute.</p>
  </td>
 </tr><tr>
  <td>
  <p>2</p>
  <p>(0x00000002)</p>
  </td>
  <td>
  <p>In addition to those for Level 1: msDFS-Commentv2,
  msDFS-Propertiesv2, and the <b>TargetCount</b> field of msDFS-TargetListv2.</p>
  </td>
 </tr><tr>
  <td>
  <p>3</p>
  <p>(0x00000003)</p>
  </td>
  <td>
  <p>In addition to those for Level 2: <b>msDFS-TargetListv2</b>.</p>
  </td>
 </tr><tr>
  <td>
  <p>4</p>
  <p>(0x00000004)</p>
  </td>
  <td>
  <p>In addition to those for Level 3: msDFS-Ttlv2,
  msDFS-NamespaceIdentityGUIDv2 for DFS root, and msDFS-LinkIdentityGUIDv2 for
  DFS link.</p>
  </td>
 </tr><tr>
  <td>
  <p>5</p>
  <p>(0x00000005)</p>
  </td>
  <td>
  <p>In addition to those for Level 4: msDFS-Propertiesv2.
  Excludes msDFS-TargetListv2.</p>
  </td>
 </tr><tr>
  <td>
  <p>6</p>
  <p>(0x00000006)</p>
  </td>
  <td>
  <p>In addition to those for Level 4: msDFS-Propertiesv2.</p>
  </td>
 </tr><tr>
  <td>
  <p>7</p>
  <p>(0x00000007)</p>
  </td>
  <td>
  <p>The value of the <b>msDFS-GenerationGUIDv2</b>
  attribute of the DFS namespace&#39;s object.</p>
  </td>
 </tr><tr>
  <td>
  <p>8</p>
  <p>(0x00000008)</p>
  </td>
  <td>
  <p>In addition to those for Level 5:
  msDFS-LinkSecurityDescriptorv2.</p>
  </td>
 </tr><tr>
  <td>
  <p>9</p>
  <p>(0x00000009)</p>
  </td>
  <td>
  <p>In addition to those for Level 6:
  msDFS-LinkSecurityDescriptorv2.</p>
  </td>
 </tr><tr>
  <td>
  <p>50</p>
  <p>(0x00000032)</p>
  </td>
  <td>
  <p>The <b>msDFS-SchemaMajorVersion</b> and <b>msDFS-SchemaMinorVersion</b>
  attributes.</p>
  </td>
 </tr><tr>
  <td>
  <p>100</p>
  <p>(0x00000064)</p>
  </td>
  <td>
  <p>The <b>msDFS-Commentv2</b> attribute.</p>
  </td>
 </tr><tr>
  <td>
  <p>150</p>
  <p>(0x00000096)</p>
  </td>
  <td>
  <p>The <b>msDFS-LinkSecurityDescriptorv2</b> attribute.</p>
  </td>
 </tr></tbody></table><p> </p></div>