Platform SDK: Access Control |
The ConvertStringSecurityDescriptorToSecurityDescriptor function converts a string-format security descriptor into a valid, functional security descriptor. This function retrieves a security descriptor that the ConvertSecurityDescriptorToStringSecurityDescriptor function converted to string format.
BOOL ConvertStringSecurityDescriptorToSecurityDescriptorW( LPCTSTR StringSecurityDescriptor, // security descriptor string DWORD StringSDRevision, // revision level PSECURITY_DESCRIPTOR *SecurityDescriptor, // SD PULONG SecurityDescriptorSize // SD size );
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError. GetLastError may return one of the following error codes.
Error Code | Meaning |
---|---|
ERROR_INVALID_PARAMETER | Invalid parameter. |
ERROR_UNKNOWN_REVISION | The SDDL revision level is invalid. |
ERROR_NONE_MAPPED | A SID in the input security descriptor string could not be found in an account lookup operation. |
Windows NT/2000: Requires Windows 2000.
Header: Declared in Sddl.h.
Library: Use Advapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.
Access Control Overview, Access Control Functions, ConvertSecurityDescriptorToStringSecurityDescriptor, ConvertSidToStringSid, ConvertStringSidToSid, MakeAbsoluteSD, SECURITY_DESCRIPTOR