Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The GetPrivateObjectSecurity function retrieves information from a private object's security descriptor.
BOOL GetPrivateObjectSecurity(
[in] PSECURITY_DESCRIPTOR ObjectDescriptor,
[in] SECURITY_INFORMATION SecurityInformation,
[out, optional] PSECURITY_DESCRIPTOR ResultantDescriptor,
[in] DWORD DescriptorLength,
[out] PDWORD ReturnLength
);
[in] ObjectDescriptor
A pointer to a SECURITY_DESCRIPTOR structure. This is the security descriptor to be queried.
[in] SecurityInformation
A set of bit flags that indicate the parts of the security descriptor to retrieve. This parameter can be a combination of the SECURITY_INFORMATION bit flags.
[out, optional] ResultantDescriptor
A pointer to a buffer that receives a copy of the requested information from the specified security descriptor. The SECURITY_DESCRIPTOR structure is returned in self-relative format.
[in] DescriptorLength
Specifies the size, in bytes, of the buffer pointed to by the ResultantDescriptor parameter.
[out] ReturnLength
A pointer to a variable the function sets to zero if the descriptor is copied successfully. If the buffer is too small for the security descriptor, this variable receives the number of bytes required. If this variable's value is greater than the value of the DescriptorLength parameter when the function returns, the function returns FALSE and none of the security descriptor is copied to the buffer.
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.
This function is intended for use by resource managers only. To implement the standard access control semantics for updating security descriptors, a resource manager should verify that the following conditions are met before calling GetPrivateObjectSecurity:
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | securitybaseapi.h (include Windows.h) |
Library | Advapi32.lib |
DLL | Advapi32.dll |
Client/Server Access Control Functions
Events
Apr 8, 3 PM - May 28, 7 AM
Sharpen your AI skills and enter the sweepstakes to win a free Certification exam
Register now!