3.1.4.1.11 NetrDfsGetSupportedNamespaceVersion (Opnum 25)

The NetrDfsGetSupportedNamespaceVersion (Opnum 25) method is used to determine the supported DFS metadata version number.<78>

The NetrDfsGetSupportedNamespaceVersion (Opnum 25) method has the following MIDL syntax.

 NET_API_STATUS NetrDfsGetSupportedNamespaceVersion(
   [in] DFS_NAMESPACE_VERSION_ORIGIN Origin,
   [in, unique, string] NETDFS_SERVER_OR_DOMAIN_HANDLE pName,
   [out] PDFS_SUPPORTED_NAMESPACE_VERSION_INFO pVersionInfo
 );

Origin: This parameter specifies the version information requested.

Value

Meaning

DFS_NAMESPACE_VERSION_ORIGIN_SERVER

0x0001

This specifies that the returned information MUST reflect the metadata versions supported by the server.

Versions supported by the server can be higher (or lower) than those supported by the domain.

DFS_NAMESPACE_VERSION_ORIGIN_DOMAIN

0x0002

This specifies that the returned information MUST reflect the metadata versions supported by the domain schema of the domain to which the server is joined.

Versions supported by the domain schema can be higher (or lower) than those supported by the server.

pName: The pointer to a null-terminated Unicode string. The server MUST ignore the pName parameter.

pVersionInfo: The pointer to a DFS_SUPPORTED_NAMESPACE_VERSION_INFO structure to receive the DFS metadata version number determined.

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.

The standalone namespace version supported by a server can be unaffected by the domain metadata schema. If this is the case, the server MUST return a standalone DFS major and minor version of zero for the DFS_NAMESPACE_VERSION_ORIGIN_DOMAIN query. In this case, the standalone DFS capability field has no meaning and MUST also be zero.

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

Thus, the version that can be used for creating a new DFS namespace is the minimum version that the domain and the server support.

This method is useful in determining an appropriate version number to pass to the NetrDfsAddRootTarget method.