NetDfsAddFtRoot function (lmdfs.h)

Creates a new domain-based Distributed File System (DFS) namespace. If the namespace already exists, the function adds the specified root target to it.

Syntax

NET_API_STATUS NET_API_FUNCTION NetDfsAddFtRoot(
  [in]           LPWSTR ServerName,
  [in]           LPWSTR RootShare,
  [in]           LPWSTR FtDfsName,
  [in, optional] LPWSTR Comment,
  [in]           DWORD  Flags
);

Parameters

[in] ServerName

Pointer to a string that specifies the name of the server that will host the new DFS root target. This value cannot be an IP address. This parameter is required.

[in] RootShare

Pointer to a string that specifies the name of the shared folder on the server that will host the new DFS root target. This parameter is required.

[in] FtDfsName

Pointer to a string that specifies the name of the new or existing domain-based DFS namespace. This parameter is required. For compatibility reasons, it should specify the same string as the RootShare parameter.

[in, optional] Comment

Pointer to a string that contains an optional comment associated with the DFS namespace.

[in] Flags

This parameter is reserved and must be zero.

Return value

If the function succeeds, the return value is NERR_Success.

If the function fails, the return value is a system error code. For a list of error codes, see System Error Codes.

Remarks

The share specified by the RootShare parameter must already exist on the server that will host the new DFS root target. This function does not create a new share.

The caller must have permission to update the DFS container in the directory service and must have Administrator privilege on the DFS host (root) server.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header lmdfs.h (include LmDfs.h, Lm.h)
Library Netapi32.lib
DLL Netapi32.dll

See also

Distributed File System (DFS) Functions

NetDfsAdd

NetDfsAddRootTarget

NetDfsAddStdRoot

NetDfsRemoveFtRoot

Network Management Functions

Network Management Overview