NetDfsGetClientInfo function (lmdfs.h)

Retrieves information about a Distributed File System (DFS) root or link from the cache maintained by the DFS client.

Syntax

NET_API_STATUS NET_API_FUNCTION NetDfsGetClientInfo(
  [in]           LPWSTR DfsEntryPath,
  [in, optional] LPWSTR ServerName,
  [in, optional] LPWSTR ShareName,
  [in]           DWORD  Level,
  [out]          LPBYTE *Buffer
);

Parameters

[in] DfsEntryPath

Pointer to a string that specifies the Universal Naming Convention (UNC) path of a DFS root or link.

For a link, the string can be in one of two forms. The first form is as follows:

\\ServerName\DfsName\link_path

where ServerName is the name of the root target server that hosts the stand-alone DFS namespace; DfsName is the name of the DFS namespace; and link_path is a DFS link.

The second form is as follows:

\\DomainName\DomDfsname\link_path

where DomainName is the name of the domain that hosts the domain-based DFS namespace; DomDfsname is the name of the DFS namespace; and link_path is a DFS link.

For a root, the string can be in one of two forms:

\\ServerName\DfsName

or

\\DomainName\DomDfsname

where the values of the names are the same as those described previously.

This parameter is required.

[in, optional] ServerName

Pointer to a string that specifies the name of the DFS root target or link target server. This parameter is optional.

[in, optional] ShareName

Pointer to a string that specifies the name of the share corresponding to the DFS root target or link target. This parameter is optional.

[in] Level

Specifies the information level of the request. This parameter can be one of the following values.

1

Return the DFS root or DFS link name. The Buffer parameter points to a DFS_INFO_1 structure.

2

Return the DFS root or DFS link name, status, and the number of DFS targets. The Buffer parameter points to a DFS_INFO_2 structure.

3

Return the DFS root or DFS link name, status, and target information. The Buffer parameter points to a DFS_INFO_3 structure.

4

Return the DFS root or DFS link name, status, GUID, time-out, and target information. The Buffer parameter points to a DFS_INFO_4 structure.

[out] Buffer

Pointer to the address of a buffer that receives the requested information. This buffer is allocated by the system and must be freed using the NetApiBufferFree function. For more information, see Network Management Function Buffers and Network Management Function Buffer Lengths.

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

No special group membership is required for using the NetDfsGetClientInfo function.

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

DFS_INFO_1

DFS_INFO_2

DFS_INFO_3

DFS_INFO_4

Distributed File System (DFS) Functions

NetDfsSetClientInfo

Network Management Functions

Network Management Overview