QueryServiceObjectSecurity function advapi32

int QueryServiceObjectSecurity(
  1. int hService,
  2. int dwSecurityInformation,
  3. Pointer<NativeType> lpSecurityDescriptor,
  4. int cbBufSize,
  5. Pointer<Uint32> pcbBytesNeeded,
)

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,
);