GetInheritanceSource function
Applies to: desktop apps only
The GetInheritanceSource function returns information about the source of inherited access control entries (ACEs) in an access control list (ACL).
Syntax
DWORD WINAPI GetInheritanceSource( __in LPTSTR pObjectName, __in SE_OBJECT_TYPE ObjectType, __in SECURITY_INFORMATION SecurityInfo, __in BOOL Container, __in_opt GUID **pObjectClassGuids, __in DWORD GuidCount, __in PACL pAcl, __in_opt PFN_OBJECT_MGR_FUNCTS pfnArray, __in PGENERIC_MAPPING pGenericMapping, __out PINHERITED_FROM pInheritArray );
Parameters
- pObjectName [in]
-
A pointer to the name of the object that uses the ACL to be checked.
- ObjectType [in]
-
The type of object indicated by pObjectName. The possible values are SE_FILE_OBJECT, SE_REGISTRY_KEY, SE_DS_OBJECT, and SE_DS_OBJECT_ALL.
- SecurityInfo [in]
-
The type of ACL used with the object. The possible values are DACL_SECURITY_INFORMATION or SACL_SECURITY_INFORMATION.
- Container [in]
-
TRUE if the object is a container object or FALSE if the object is a leaf object. Note that the only leaf object is SE_FILE_OBJECT.
- pObjectClassGuids [in, optional]
-
Optional list of GUIDs that identify the object types or names associated with pObjectName. This may be NULL if the object manager only supports one object class or has no GUID associated with the object class.
- GuidCount [in]
-
Number of GUIDs pointed to by pObjectClassGuids.
- pAcl [in]
-
The ACL for the object.
- pfnArray [in, optional]
-
Reserved. Set this parameter to NULL.
- pGenericMapping [in]
-
The mapping of generic rights to specific rights for the object.
- pInheritArray [out]
-
A pointer to an array of INHERITED_FROM structures that the GetInheritanceSource function fills with the inheritance information. The caller must allocate enough memory for an entry for each ACE in the ACL.
Return value
If the function succeeds, the function returns ERROR_SUCCESS.
If the function fails, it returns a nonzero error code defined in WinError.h.
Remarks
The GetInheritanceSource function allocates memory for the names returned in the INHERITED_FROM structure. When the function has finished using this memory, the calling program must free it by calling FreeInheritedFromArray. Note that the caller must provide memory for the array itself. If the caller allocated the memory, the caller must free that memory after calling FreeInheritedFromArray.
This function does not handle race conditions. If your thread calls this function at the approximate time that another thread changes the object's security descriptor, then this function could fail.
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | GetInheritanceSourceW (Unicode) and GetInheritanceSourceA (ANSI) |
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012