Rob Shearman : advapi32: The lpcbSecurityDescriptor parameter to RegGetKeySecurity isn't optional, so don't complicate the code by treating as though it is.