Location: Symbol Reference > Classes > TJwSecureFileObject Class > TJwSecureFileObject Methods > GetFileInheritanceSource Method > TJwSecureFileObject.GetFileInheritanceSource Method (TJwString, Boolean, TJwSecurityInformationFlagSet, TJwOnGetNamedSecurityInfo, Pointer)
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwSecureFileObject.GetFileInheritanceSource Method (TJwString, Boolean, TJwSecurityInformationFlagSet, TJwOnGetNamedSecurityInfo, Pointer)
Pascal
class function GetFileInheritanceSource(const PathName: TJwString; const Container: Boolean; const aSecurityInfo: TJwSecurityInformationFlagSet = [siDaclSecurityInformation]; const OnGetNamedSecurityInfo: TJwOnGetNamedSecurityInfo = nil; const Data: Pointer = nil): TJwInheritedFromArray; virtual; overload;
Parameters 
Description 
const PathName: TJwString 
defines an absolute PathName to a file or folder  
const aSecurityInfo: TJwSecurityInformationFlagSet = [siDaclSecurityInformation] 
defines the type of security inheritance is to be obtained. The value can be one of siDaclSecurityInformation or siSaclSecurityInformation.  
const OnGetNamedSecurityInfo: TJwOnGetNamedSecurityInfo = nil 
defines a callback function which is called everytime security information is retrieved. Set to nil if not used.  
const Data: Pointer = nil 
receives custom information applied to the Data parameter of all OnGetNamedSecurityInfo function calls.
 

The return value is an array of TJwInheritedFromRecord with the count of ACE in the DACL of the object in PathName Each array entry consists of 

  • GenerationGap Levels between the object and the ancestor
  • AncestorName Name of the ancestor from which the ACE was inherited
  • SID The SID that is inherited. The string has the type  

    <SID account name>@<S-X-X...> 

GetFileInheritanceSource retrieves the source of inheritance for the ACEs in the ACL of the given object. This method simulates GetInheritanceSource so it can be used in all windows versions with ACL support. 

 

This functions emulates the GetInheritanceSource function available in Windows XP and newer. Since the inheritance functionality of NTFS isn't fully known to the author (and also may change) the emulation will not be 100% compatible to the original. If you run on Windows XP or newer you should consider to use the original function. However in this case you can't use a security descriptor cache mechanism through the OnGetNamedSecurityInfo event.

Exceptions 
Description 
will be raised if the instance is created with a handle instead of a file or folder name. will be raised if the path does not have the pattern: X:[folder]* or is a relative path. UNC paths are not supported. 
will be raised if the object could not be accessed or found. 
will be raised if aSecurityInfo is not [siDaclSecurityInformation] or [siSaclSecurityInformation] 
will be raised if aSecurityInfo is [siSaclSecurityInformation] and the current thread does cannot access audit information, because the privilege could not be activated. 
Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc.
What do you think about this topic? Send feedback!