DeleteService function advapi32

Win32Result<bool> DeleteService(
  1. SC_HANDLE hService
)

Marks the specified service for deletion from the service control manager database.

To learn more, see learn.microsoft.com/windows/win32/api/winsvc/nf-winsvc-deleteservice.

Implementation

Win32Result<bool> DeleteService(SC_HANDLE hService) {
  resolveGetLastError();
  final result_ = _DeleteService(hService);
  return .new(value: result_ != FALSE, error: GetLastError());
}