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

# DoAsyncEjectMedia

Ejects the media.

```
virtual kern_return_t DoAsyncEjectMedia(uint32_t requestID);
```

## Parameters

`requestID`

An opaque identifier. After the dext completes the request, it calls [`Complete`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/Complete) and sends this value as a parameter.

## Return Value

A value that indicates the eject result. <doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> indicates success. For error definitions, see <doc://com.apple.documentation/documentation/iokit/iokit_constants>.

## Discussion

When the eject operation completes, the dext calls your [`Complete`](/documentation/BlockStorageDeviceDriverKit/IOUserBlockStorageDevice/Complete) method with the results of the operation.

---

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)