3.1.4.4.2 NetrDfsRemoveStdRoot (Opnum 13)
The NetrDfsRemoveStdRoot (Opnum 13) method deletes the specified stand-alone DFS namespace.<122> The DFS namespace can be removed without first removing all of the links in it.
The NetrDfsRemoveStdRoot method uses the following MIDL syntax.
-
NET_API_STATUS NetrDfsRemoveStdRoot( [in, string] WCHAR* ServerName, [in, string] WCHAR* RootShare, [in] DWORD ApiFlags );
ServerName: The pointer to a null-terminated Unicode string. This is the host name of the DFS root target to be removed.
RootShare: The pointer to a null-terminated Unicode DFS root target share name string. This is also the DFS namespace name. The share is not removed automatically when the method is successful; it MUST be removed explicitly, as needed.
ApiFlags: This parameter is reserved for future use and is ignored by the server.
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.
0x00000490
ERROR_NOT_FOUND
The DFS namespace that the ServerName and RootShare parameters specify does not already exist.
The server MUST support the removal of a DFS namespace without requiring that all of the DFS links be removed first.
On receiving this method, the server MUST do the following:
If there is no entry in the NamespaceList with the NamespaceName matching RootShare, then the RPC method MUST fail with ERROR_NOT_FOUND (0x00000490).
Remove the Namespace object corresponding to the RootShare from the NamespaceList.
Remove the Namespace object from the local information store.
The server SHOULD remove any intermediate directories and reparse points that were part of the namespace.