Platform SDK: Access Control |
The ConvertSidToStringSid function converts a SID to a string format suitable for display, storage, or transmission.
To convert the string-format SID back to a valid, functional SID, call the ConvertStringSidToSid function.
BOOL ConvertSidToStringSid( PSID Sid, // SID LPTSTR *StringSid // SID string );
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_NOT_ENOUGH_MEMORY | Insufficient memory. |
ERROR_NONE_MAPPED | The SID could not be found in an account lookup operation. |
The ConvertSidToStringSid function uses the standard S-R-I-S-S... format for SID strings. For more information about SID string notation, see SID Components.
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, ConvertStringSecurityDescriptorToSecurityDescriptor, ConvertStringSidToSid, SID