GetUserObjectSecurity

  BOOL GetUserObjectSecurity(hObject, SecurityInformation, ResultantDescriptor, DescriptorLength, ReturnLength)    
  HANDLE hObject;    
  PSECURITY_INFORMATION SecurityInformation;    
  PSECURITY_DESCRIPTOR ResultantDescriptor;    
  DWORD DescriptorLength;    
  LPDWORD ReturnLength;    

The GetUserObjectSecurity function retrieves security information for the specified user object.

Parameters

hObject

Identifies the user object to return security information for.

SecurityInformation

Pointer to a SECURITY_INFORMATION data structure that specifies the security information being requested.

ResultantDescriptor

Pointer to a buffer into which the function will store the resultant security descriptor. The resultant security descriptor will contain all information specified by the SecurityInformation parameter.

DescriptorLength

Specifies the length in bytes of the buffer pointed to by ResultantDescriptor.

ReturnLength

Pointer to a variable that the function will set to the actual number of bytes needed to store the requested information. If the value returned is greater than the value specified by DescriptorLength, the function returns the value STATUS_BUFFER_TOO_SMALL and stores no information into the buffer.

Return Value

The return value is TRUE if the function was successful, or FALSE if an error occurred. Use the GetLastError function to obtain extended error information.

See Also

MakeSelfRelativeSD, CreatePrivateObjectSecurity, DestroyPrivateObjectSecurity, MakeAbsoluteSD, SetUserObjectSecurity