openusb_get_lib_handle

OpenUSB Developers Guide
Prev |  | Next

# `openusb_get_lib_handle`

## Name

`openusb_get_lib_handle` -- Extract openusb handle from a device handle

## Synopsis

``int32_t openusb_get_lib_handle`(openusb_dev_handle_t dev, openusb_handle_t * lib_handle);`

## Parameters

`dev` - Device handle.

`lib_handle` - Address to store returned openusb handle

## Description

`openusb_get_lib_handle()` gets the openusb handle of the device whose device handle is `dev`.

## Return Value

`openusb_get_devid()` returns 0 on success. Otherwise, a openusb error is returned.

OPENUSB_SUCCESS - No errors.

OPENUSB_UNKNOWN_DEVICE - Device handle `dev`is not valid.

OPENUSB_BADARG - `lib_handle` is an invalid address

## See Also

Prev | Home | Next
`openusb_get_devid` | Up | `openusb_get_max_xfer_size`