---
title: SetHandler
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/ioservicestatenotificationdispatchsource/sethandler
---

# SetHandler

## Declaration

```occ
virtual kern_return_t SetHandler(OSAction *action);
```

## Return Value

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