ClusterRegSetKeySecurity function

Sets the security attributes for a cluster database key.

Syntax

LONG ClusterRegSetKeySecurity(
  HKEY                 hKey,
  SECURITY_INFORMATION SecurityInformation,
  PSECURITY_DESCRIPTOR pSecurityDescriptor
);

Parameters

hKey

Handle to a cluster database key.

SecurityInformation

A SECURITY_INFORMATION structure that indicates the content of the security descriptor pointed to by pSecurityDescriptor.

pSecurityDescriptor

Pointer to a SECURITY_DESCRIPTOR structure that describes the security attributes to set for the key corresponding to hKey.

Return Value

If the operation succeeds, the function returns ERROR_SUCCESS (0).

If the operation fails, the function returns a system error code.

Remarks

The ClusterRegSetKeySecurity function generates a CLUSTER_CHANGE_REGISTRY_ATTRIBUTES event for all registered notification ports.

Do not call ClusterRegSetKeySecurity from the following resource DLL entry point functions:

ClusterRegSetKeySecurity can be safely called from any other resource DLL entry point function or from a worker thread. For more information, see Function Calls to Avoid in Resource DLLs.

Requirements

   
Windows version None supported Windows Server 2008 Enterprise, Windows Server 2008 Datacenter
Target Platform Windows
Header clusapi.h
Library ClusAPI.lib
DLL ClusAPI.dll

See Also

ClusterRegOpenKey