NetDfsGetSupportedNamespaceVersion function (lmdfs.h)

Determines the supported metadata version number.

Syntax

NET_API_STATUS NET_API_FUNCTION NetDfsGetSupportedNamespaceVersion(
  [in]  DFS_NAMESPACE_VERSION_ORIGIN          Origin,
  [in]  PWSTR                                 pName,
  [out] PDFS_SUPPORTED_NAMESPACE_VERSION_INFO *ppVersionInfo
);

Parameters

[in] Origin

A DFS_NAMESPACE_VERSION_ORIGIN enumeration value that specifies the origin of the DFS namespace version.

[in] pName

A string that specifies the server name or domain name. If the value of the Origin parameter is DFS_NAMESPACE_VERSION_ORIGIN_DOMAIN, this string must be an AD DS domain name. Otherwise, it must be a server name. This parameter is required and cannot be NULL.

[out] ppVersionInfo

A pointer to a DFS_SUPPORTED_NAMESPACE_VERSION_INFO structure that receives the DFS metadata version number.

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

This function is useful in determining an appropriate version number to pass to the NetDfsAddRootTarget function.

The version number of the DFS metadata that can be used for a new DFS namespace depends on the following:

  • For domain-based DFS namespaces, the version supported by the DFS metadata schema that is being used in the AD DS domain.
  • The version supported by the server that is to host the DFS root target.
Thus, the maximum DFS metadata version number that can be used for a new DFS namespace is the minimum of the version supported by the AD DS domain and the version supported by the server. This maximum can be determined by calling the NetDfsGetSupportedNamespaceVersion function with the pName parameter set to the name of the server that is to host the new DFS root target and the Origin parameter set to DFS_NAMESPACE_VERSION_ORIGIN_COMBINED.

Requirements

Requirement Value
Minimum supported client Windows Vista with SP1
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

DFS_NAMESPACE_VERSION_ORIGIN

DFS_SUPPORTED_NAMESPACE_VERSION_INFO

Distributed File System (DFS) Functions

NetDfsAddRootTarget

Network Management Functions

Network Management Overview