QueryServiceObjectSecurity function advapi32
The QueryServiceObjectSecurity function retrieves a copy of the security descriptor associated with a service object. You can also use the GetNamedSecurityInfo function to retrieve a security descriptor.
BOOL QueryServiceObjectSecurity(
[in] SC_HANDLE hService,
[in] SECURITY_INFORMATION dwSecurityInformation,
[out, optional] PSECURITY_DESCRIPTOR lpSecurityDescriptor,
[in] DWORD cbBufSize,
[out] LPDWORD pcbBytesNeeded
);
Implementation
int QueryServiceObjectSecurity(
int hService,
int dwSecurityInformation,
Pointer lpSecurityDescriptor,
int cbBufSize,
Pointer<Uint32> pcbBytesNeeded) =>
_QueryServiceObjectSecurity(hService, dwSecurityInformation,
lpSecurityDescriptor, cbBufSize, pcbBytesNeeded);