Location: Symbol Reference > Classes > TJwSecureRegistryKey Class > TJwSecureRegistryKey Methods > TakeOwnerShip Method > TJwSecureRegistryKey.TakeOwnerShip Method (TJwString, TJwSecurityId)
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwSecureRegistryKey.TakeOwnerShip Method (TJwString, TJwSecurityId)
Pascal
class procedure TakeOwnerShip(const KeyName: TJwString; SID: TJwSecurityId = nil); virtual; overload;
Parameters 
Description 
SID: TJwSecurityId = nil 
defines the new owner. If nil the current user is used. 
PathName 
Defines the file or folder which owner is to be changed  

Name takes the ownership of a file or folder. If the current has the SE_TAKE_OWNERSHIP_NAME available it is made active automatically. The owner is set to to current owner or given SID. To set the owner to an arbitrary one the caller must enable SE_RESTORE_PRIVILEGE. The function doesnt do it. 

 

Exceptions 
Description 
See SetNamedSecurityInfo for more exceptions 
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!