Once the security descriptor is in string format, it can more easily be stored or transmitted. Use the CSecurityDesc::FromString method to convert the string back into a security descriptor.
The si parameter can contain the following SECURITY_INFORMATION flags:
|
Value
|
Meaning
|
| OWNER_SECURITY_INFORMATION | Include the owner. |
| GROUP_SECURITY_INFORMATION | Include the primary group. |
| DACL_SECURITY_INFORMATION | Include the DACL. |
| SACL_SECURITY_INFORMATION | Include the SACL. |
If the DACL is NULL and the SE_DACL_PRESENT control bit is set in the input security descriptor, the method fails.
If the DACL is NULL and the SE_DACL_PRESENT control bit is not set in the input security descriptor, the resulting security descriptor string does not have a D: component. See Security Descriptor String Format for more details.
This method is only available with Windows 2000 and later, as it calls ConvertStringSecurityDescriptorToSecurityDescriptor.