---
title: SetEnableWithCompletion
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/ioservicenotificationdispatchsource/setenablewithcompletion
---

# SetEnableWithCompletion

## Declaration

```occ
virtual kern_return_t SetEnableWithCompletion(bool enable, IODispatchSourceCancelHandler handler);
```

## Return Value

Return Value kIOReturnSuccess on success. See IOReturn.h for error codes.
