3.1.4.4.3 NetrDfsAddStdRootForced (Opnum 15)
The NetrDfsAddStdRootForced (Opnum 15) method creates a new stand-alone DFS namespace without checking for the availability and accessibility of the specified share.<123><124><125>
The NetrDfsAddStdRootForced method uses the following MIDL syntax.
-
NET_API_STATUS NetrDfsAddStdRootForced( [in, string] WCHAR* ServerName, [in, string] WCHAR* RootShare, [in, string] WCHAR* Comment, [in, string] WCHAR* Share );
ServerName: The pointer to a null-terminated Unicode string. This is the host name of the new DFS root target.
RootShare: The pointer to a null-terminated Unicode DFS root target share name string. This is also the DFS namespace name. This method does not create the share; it MUST be created separately.
Comment: The pointer to a null-terminated Unicode string that contains a comment associated with the DFS namespace. 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.
Share: The pointer to a null-terminated Unicode string that contains the local file system path corresponding to the share on the server receiving the RPC method, in the following form:
-
-
<X>:\<path>
-
-
where <X> is a drive letter (a single character from A to Z) and <path> is a file system path whose leaf component is a directory.
Return Values: 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 [MS-ERREF] section 2.2. The most common error codes are listed in the following table.
-
Return value/code
Description
0x00000000
ERROR_SUCCESS
Successful completion.
0x00000005
ERROR_ACCESS_DENIED
Permission to perform the operation was denied.
0x000000B7
ERROR_ALREADY_EXISTS
The DFS namespace that the ServerName and RootShare parameters specify already exists.
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 RootShare parameter specifies is not available or accessible.
On receiving this method, the server MUST do the following.
If there is any entry in the NamespaceList with the NamespaceName matching RootShare, then the RPC method MUST fail with ERROR_ALREADY_EXISTS (0x000000B7).
Create and initialize the Namespace object, as specified in section 3.1.4.4.1, and insert it into the NamespaceList.
The server MUST synchronously insert the Namespace object into the local information store.