---
title: AbortDeviceRequests
framework: usbdriverkit
role: symbol
role_heading: Instance Method
path: usbdriverkit/iousbhostinterface/abortdevicerequests
---

# AbortDeviceRequests

Aborts device requests that you made previously from the current interface client.

## Declaration

```occ
virtual kern_return_t AbortDeviceRequests(IOOptionBits options, IOReturn withError);
```

## Parameters

- `options`: Specify 0 for this parameter.
- `withError`: The error value to report for each request. Specify kIOReturnAborted for this parameter.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.

## Discussion

Discussion Use this method to abort any requests you made previously with the AsyncDeviceRequest method. This method aborts only the requests that the current interface object initiated.

## See Also

### Requesting Data from the Default Control Endpoint

- [DeviceRequest](usbdriverkit/iousbhostinterface/devicerequest.md)
- [AsyncDeviceRequest](usbdriverkit/iousbhostinterface/asyncdevicerequest.md)
