Location: Symbol Reference > Classes > TJwSecureRegistryKey Class > TJwSecureRegistryKey Methods > GetKeyInheritanceSource Method > TJwSecureRegistryKey.GetKeyInheritanceSource Method (TJwRootRegKey, TJwString, boolean, TJwSecurityInformationFlagSet)
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwSecureRegistryKey.GetKeyInheritanceSource Method (TJwRootRegKey, TJwString, boolean, TJwSecurityInformationFlagSet)
Pascal
class function GetKeyInheritanceSource(const RootKey: TJwRootRegKey; const KeyName: TJwString; const bUseWOW64: boolean = False; const aSecurityInfo: TJwSecurityInformationFlagSet = [siDaclSecurityInformation]): TJwInheritedFromArray; virtual; overload;
Parameters 
Description 
const RootKey: TJwRootRegKey 
defines the type or root key which is used. It can be on of the following values.
  • rrkString
  • rrkLocalMachine
  • rrkCurrentUser
  • rrkUsers
  • rrkCurrentConfig
  • rrkClassesRoot

rrkString defines that the root key is located in the parameter KeyName as a string.
 
const aSecurityInfo: TJwSecurityInformationFlagSet = [siDaclSecurityInformation] 
defines the type of security inheritance is to be obtained. The value can be one of siDaclSecurityInformation or siSaclSecurityInformation.
 

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...>

BUGBUGBUG - DO NOT USE! 

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

GetKeyInheritanceSource supports connection to a remote registry. To use a remote connection set RootKey to rrkString and use a fully quallified key path (like '\\computer\USERS', '\\computer\USERS\S-1-5-18\Control Panel\Current'). A remote connection with another constant like rrkString is not supported. GetKeyInheritanceSource uses internally RegConnectRegistry. See http://msdn2.microsoft.com/en-us/library/ms724840.aspx for more information. 

 

Exceptions 
Description 
will be raised if the instance is created with a handle instead of a file or key name. 
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!