---
title: Open
framework: usbdriverkit
role: symbol
role_heading: Instance Method
path: usbdriverkit/iousbhostinterface/open
---

# Open

Opens a session to the host interface.

## Declaration

```occ
virtual kern_return_t Open(IOService *forClient, IOOptionBits options, uint8_t *arg);
```

## Parameters

- `forClient`: The service object that is opening the session.
- `options`: The options to use when opening the session. Specify doc://com.apple.documentation/documentation/kernel/3143215-anonymous/kusbhostopenoptionselectalternatesetting to select an alternative setting for this interface immediately. Specify the alternative setting in the arg parameter.
- `arg`: Additional arguments to the function. If you specify doc://com.apple.documentation/documentation/kernel/3143215-anonymous/kusbhostopenoptionselectalternatesetting for the options parameter, use this value to specify the value for the alternative setting; otherwise, specify NULL.

## Return Value

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

## Discussion

Discussion This method opens a session to the IOUSBHostInterface, and acquires the service’s workloop lock. Only one service at a time may open a session to the interface.

## See Also

### Managing the Device Session

- [Close](usbdriverkit/iousbhostinterface/close.md)
