QueryServiceConfig2 function advapi32
Retrieves the optional configuration parameters of the specified service.
To learn more, see learn.microsoft.com/windows/win32/api/winsvc/nf-winsvc-queryserviceconfig2w.
Implementation
Win32Result<bool> QueryServiceConfig2(
SC_HANDLE hService,
SERVICE_CONFIG dwInfoLevel,
Pointer<Uint8>? lpBuffer,
int cbBufSize,
Pointer<Uint32> pcbBytesNeeded,
) {
final result_ = QueryServiceConfig2W_Wrapper(
hService,
dwInfoLevel,
lpBuffer ?? nullptr,
cbBufSize,
pcbBytesNeeded,
);
return .new(value: result_.value.i32 != FALSE, error: result_.error);
}