Location: Symbol Reference > Classes > TJwSecurityDescriptor Class > TJwSecurityDescriptor.CreateDefaultByToken Constructor
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwSecurityDescriptor.CreateDefaultByToken Constructor
Pascal
constructor CreateDefaultByToken(const DefaultToken: TObject = nil; const RequestedTokenType: TJwRequestedTokenType = rttAuto);
Parameters 
Description 
const DefaultToken: TObject = nil 
defines a user defined token to be used. It must be of type TJwSecurityToken. (because of unit dependings it cannot be the correct type)  
const RequestedTokenType: TJwRequestedTokenType = rttAuto 
defines which token should be used for the new SD. If parameter DefaultToken is not nil, RequestedTokenType will be ignored. The following values are possible.
  • rttAuto The token of the thread will be used if any; otherwise the process token.
  • rttTokenPrimary The process token is forced to use. See TJwSecurityToken.CreateTokenByProcess for more information
  • rttTokenImpersonation The thread token is forced to be used. The token is opened against the process rights. See TJwSecurityToken.CreateTokenByThread for more information
 

CreateDefaultByToken creates a default security descriptor. It will contain the same elements as if a securable object (like mutex) is created without a SD.

Exceptions 
Description 
will be raised if parameter DefaultToken is not of type TJwSecurityToken
will be raised if parameter RequestedTokenType defines rttTokenImpersonation and no thread token is available 
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!