<!--
{
  "availability" : [
    "DriverKit: 21.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioDriverKit",
  "identifier" : "/documentation/AudioDriverKit/IOUserAudioBox/SetAcquisitionFailure",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AudioDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserAudioBox@F@SetAcquisitionFailure#I#"
  },
  "title" : "SetAcquisitionFailure"
}
-->

# SetAcquisitionFailure

Sets the error code to return when box acquisition fails.

```
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

<doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> on success, or another value if an error occurs. For a list of error codes, see <doc://com.apple.documentation/documentation/DriverKit/error-codes>.

## Discussion

Set this code to provide the error to return from failed calls to [`HandleChangeAcquireBox`](/documentation/AudioDriverKit/IOUserAudioBox/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)