Location: Symbol Reference > Classes > TJwSecurityDescriptor Class > TJwSecurityDescriptor Methods > Create_SD Method > TJwSecurityDescriptor.Create_SD Method (Cardinal, boolean)
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
TJwSecurityDescriptor.Create_SD Method (Cardinal, boolean)
Pascal
function Create_SD(out ipSDSize: Cardinal; bRelative: boolean): PSecurityDescriptor; overload;
Parameters 
Description 
out ipSDSize: Cardinal 
[out] receives the size of the returned security descriptor block. It is sizeof(TJwSecurityDescriptor) if parameter bRelative is false (absolute SD) otherwise it is a non zero value.
 
bRelative: boolean 
The boolean parameter defines whether the sd is a self relative if true or otherwise an absolute SD (false). = true
= true 

Create_SD creates a self relative (continuous block of memory) or an absolute (using pointers to owner, DACL, ...) security descriptor (SD). 

The function calls a lot of winapi function that can fail. So check for exception. See the exceptions. In a case of exception the return value is undefined. However already allocated memory is freed. A case for a failure can be an incorrect owner SID, DACLs or out of memory. 

Do not edit the memory block manually or even free sub structures (as owner, dacl...) Create_SD uses GetMem for sd memory allocation. 

You can set Control or RMControl to modify the resulting control value of the security descriptor block. The values SE_DACL_PRESENT and SE_SACL_PRESENT are always automatically set. SE_RELATIVE is set, if parameter bRelative is true. SE_SACL_PRESENT will be set if property SACL/AuditACL is not nil. 

 

Exceptions 
Description 
If a call to a winapi function failed. 
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!