---
title: Close
framework: usbdriverkit
role: symbol
role_heading: Instance Method
path: usbdriverkit/iousbhostinterface/close
---

# Close

Closes the session to the host interface.

## Declaration

```occ
virtual kern_return_t Close(IOService *forClient, IOOptionBits options);
```

## Parameters

- `forClient`: The service object that is closing the session.
- `options`: Options to use when closing the service. Specify 0 for this parameter.

## Return Value

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

## Discussion

Discussion This method closes a session to an interface that you previously opened using the Open method. The method acquires the service’s workloop lock, and aborts any I/O for the interface and its endpoints. This method may also call commandSleep to allow for the processing of aborted I/O before returning.

## See Also

### Managing the Device Session

- [Open](usbdriverkit/iousbhostinterface/open.md)
