Below code snippet demonstrate how to get DACL Security Descriptor in SDDL format for a targeted registry key.
You can also play with flags associated to ConvertSecurityDescriptorToStringSecurityDescriptor
call to extract even more information from captured Security Descriptor Pointer after RegGetKeySecurity
call.