SetEnableWithCompletion
Controls the enable state of the interrupt source.
Declaration
virtual kern_return_t SetEnableWithCompletion(bool enable, IODispatchSourceCancelHandler handler);Parameters
- enable:
A Boolean value that indicates whether to enable the dispatch source. Specify
trueto enable the source orfalseto disable it. - handler:
An optional block to execute after this method successfully disables the dispatch source.
Return Value
kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.