Open
Opens a session to the host interface.
Declaration
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 Kusbhostopenoptionselectalternatesetting to select an alternative setting for this interface immediately. Specify the alternative setting in the
argparameter. - arg:
Additional arguments to the function. If you specify Kusbhostopenoptionselectalternatesetting for the
optionsparameter, use this value to specify the value for the alternative setting; otherwise, specifyNULL.
Return Value
kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.
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.