DSCreateISecurityInfoObject function (dssec.h)

The DSCreateISecurityInfoObject function creates an instance of the ISecurityInformation interface associated with the specified directory service (DS) object.

Syntax

HRESULT DSCreateISecurityInfoObject(
  [in]           LPCWSTR                pwszObjectPath,
  [in]           LPCWSTR                pwszObjectClass,
  [in]           DWORD                  dwFlags,
  [out]          LPSECURITYINFO         *ppSI,
  [in, optional] PFNREADOBJECTSECURITY  pfnReadSD,
  [in, optional] PFNWRITEOBJECTSECURITY pfnWriteSD,
  [in]           LPARAM                 lpContext
);

Parameters

[in] pwszObjectPath

The full path of the DS object for which to create an instance of the ISecurityInformation interface.

[in] pwszObjectClass

The class of the object specified by the pwszObjectPath parameter.

[in] dwFlags

Flags used for the security property page associated with the new instance of the ISecurityInformation interface. This parameter can be any combination of the following flags.

Value Meaning
DSSI_READ_ONLY
0x00000001
The security properties are read-only.
DSSI_NO_ACCESS_CHECK
0x00000002
No access check is performed.
DSSI_NO_EDIT_SACL
0x00000004
The system access control list (SACL) property is read-only.
DSSI_NO_EDIT_OWNER
0x00000008
The object owner property is read-only.
DSSI_IS_ROOT
0x00000010
The object is a root object.
DSSI_NO_FILTER
0x00000020
Do not apply any filters.
DSSI_NO_READONLY_MESSAGE
0x00000040
Suppress read-only popup messages.

[out] ppSI

A pointer to the instance of the ISecurityInformation interface this function creates.

[in, optional] pfnReadSD

A pointer to a function used to read the security descriptor of the object. This value can be NULL. If pfnReadSD is not NULL, DSCreateISecurityInfoObject calls the function referenced by pfnReadSD to retrieve the security descriptor of the object.

[in, optional] pfnWriteSD

A pointer to a function used to write the security descriptor of the object. This value can be NULL. If pfnWriteSD is not NULL, DSCreateISecurityInfoObject calls the function referenced by pfnWriteSD to write the security descriptor of the object.

[in] lpContext

Context to pass to the functions identified by the pfnReadSD and pfnWriteSD parameters.

Return value

If the function succeeds, the function returns S_OK.

If the function fails, it returns an HRESULT value that indicates the error. For a list of common error codes, see Common HRESULT Values.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows ServerĀ 2008 [desktop apps only]
Target Platform Windows
Header dssec.h
Library DSSec.lib
DLL DSSec.dll