The DSCreateISecurityInfoObjectEx function creates an instance of the ISecurityInformation interface associated with the specified directory service (DS) object on the specified server.
Syntax
HRESULT WINAPI DSCreateISecurityInfoObjectEx(
__in LPCWSTR pwszObjectPath,
__in LPCWSTR pwszObjectClass,
__in LPCWSTR pwszServer,
__in LPCWSTR pwszUserName,
__in LPCWSTR pwszPassword,
__in DWORD dwFlags,
__out LPSECURITYINFO *ppSI,
__in_opt PFNREADOBJECTSECURITY pfnReadSD,
__in_opt PFNWRITEOBJECTSECURITY pfnWriteSD,
__in LPARAM lpContext
);
Parameters
- pwszObjectPath [in]
-
The full path of the DS object for which to create an instance of the ISecurityInformation interface.
- pwszObjectClass [in]
-
The class of the object specified by the pwszObjectPath parameter.
- pwszServer [in]
-
The server of the object specified by the pwszObjectPath parameter. If the value of this parameter is NULL, the server is obtained from the path specified by the pwszObjectPath parameter.
- pwszUserName [in]
-
A user name to be associated with the new ISecurityInformation object. If the value of this parameter is NULL, the Active Directory Services Interfaces (ADSI) default is used.
- pwszPassword [in]
-
A password to be associated with the new ISecurityInformation object. If the value of this parameter is NULL, the Active Directory Services Interfaces (ADSI) default is used.
- dwFlags [in]
-
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
| TBD
|
- DSSI_NO_READONLY_MESSAGE
- 0x00000040
| TBD
|
- ppSI [out]
-
A pointer to the instance of the ISecurityInformation interface this function creates.
- pfnReadSD [in, optional]
-
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.
- pfnWriteSD [in, optional]
-
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.
- lpContext [in]
-
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
| Minimum supported client | None supported |
| Minimum supported server | Windows Server 2008 |
| Header | DSSec.h |
| Library | DSSec.lib |
| DLL | DSSec.dll |
Send comments about this topic to Microsoft
Build date: 9/11/2009