---
title: SetAcquisitionFailure
framework: audiodriverkit
role: symbol
role_heading: Instance Method
path: audiodriverkit/iouseraudiobox/setacquisitionfailure
---

# SetAcquisitionFailure

Sets the error code to return when box acquisition fails.

## Declaration

```occ
kern_return_t SetAcquisitionFailure(kern_return_t in_failure_code);
```

## Parameters

- `in_failure_code`: An error code to return when box acquisition fails.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. For a list of error codes, see Error Codes.

## Discussion

Discussion Set this code to provide the error to return from failed calls to HandleChangeAcquireBox. If successful, changing the acquisition failure code sends a notification to the host to update the object state. This method synchronizes by using the work queue created by the object.

## See Also

### Managing Acquirability

- [HandleChangeAcquireBox](audiodriverkit/iouseraudiobox/handlechangeacquirebox.md)
- [SetIsAcquired](audiodriverkit/iouseraudiobox/setisacquired.md)
- [IsAcquired](audiodriverkit/iouseraudiobox/isacquired.md)
- [SetIsAcquirable](audiodriverkit/iouseraudiobox/setisacquirable.md)
- [IsAcquirable](audiodriverkit/iouseraudiobox/isacquirable.md)
- [GetAcquisitionFailure](audiodriverkit/iouseraudiobox/getacquisitionfailure.md)
