NetDfsSetStdContainerSecurity function (lmdfs.h)

Sets the security descriptor for the container object of the specified stand-alone DFS namespace.

Syntax

NET_API_STATUS NET_API_FUNCTION NetDfsSetStdContainerSecurity(
  [in] LPWSTR               MachineName,
  [in] SECURITY_INFORMATION SecurityInformation,
  [in] PSECURITY_DESCRIPTOR pSecurityDescriptor
);

Parameters

[in] MachineName

The name of the stand-alone DFS root's host machine. Pointer to a string that specifies the name of the server that hosts the stand-alone DFS namespace.

[in] SecurityInformation

SECURITY_INFORMATION structure that contains bit flags that indicate the type of security information to set on the root object.

[in] pSecurityDescriptor

Pointer to a SECURITY_DESCRIPTOR structure that contains the security attributes to set as specified in the SecurityInformation parameter.

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

The security descriptor is set for the object specified by the HKLM\Software\Microsoft\Dfs\Standalone key in the registry of the server specified in the MachineName parameter.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008, Windows Server 2008
Target Platform Windows
Header lmdfs.h (include LmDfs.h, Lm.h)
Library Netapi32.lib
DLL Netapi32.dll

See also

Distributed File System (DFS) Functions

Network Management Functions

Network Management Overview