Hier ein Auszug aus
MSDN.
http://
msdn.microsoft.com/en-us/library/aa379313(VS.85).aspx
Syntax
RegGetKeySecurity(HKEY hKey,SECURITY_INFORMATION SecurityInformation,PSECURITY_DESCRIPTOR pSecurityDescriptor,LPDWORD lpcbSecurityDescriptor);
Parameters
hKey [in]
A
handle to an open key for which to retrieve the security descriptor.
SecurityInformation [in]
A SECURITY_INFORMATION value that indicates the requested security information.
pSecurityDescriptor [out, optional]
A pointer to a buffer that receives a copy of the requested security descriptor.
lpcbSecurityDescriptor [in, out]
A pointer to a variable that specifies the size, in bytes, of the buffer pointed to by the pSecurityDescriptor parameter. When the function returns, the variable contains the number of bytes written to the buffer.