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

# AbortDeviceRequests

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

## Declaration

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

## Parameters

- `forClient`: The client that issued the requests.
- `options`: Options to use when aborting requests. 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 device object initiated.

## See Also

### Requesting Information from the Device

- [DeviceRequest](usbdriverkit/iousbhostdevice/devicerequest.md)
- [AsyncDeviceRequest](usbdriverkit/iousbhostdevice/asyncdevicerequest.md)
- [CompleteAsyncDeviceRequest](usbdriverkit/iousbhostdevice/completeasyncdevicerequest.md)
