openusb_get_busid_list, openusb_free_busid_list
openusb_get_busid_list, openusb_free_busid_list
-- Return all busids in the system, Free returned busids handle
- An openusb instance handle, obtained in openusb_init
.
busids
- Pointer to address of the busid list.
num_busids
- Number of bus ids in the list.
openusb_get_busid_list()
returns all the ids of busses in a system. The
busids are used by other openusb functions to search and match specific
devices that an application will operate on.
openusb_free_busid_list()
frees the busids returned in
openusb_get_busid_list()
.
openusb_get_busid_list
may have the following return values,
OPENUSB_SUCCESS - Callback was successfully set.
OPENUSB_BADARG - Invalid argument. busids or num_busids is NULL. Or, (*busids) is NOT null, otherwise it will cause memory leak..
OPENUSB_INVALID_HANDLE - Invalid handle.
OPENUSB_NULL_LIST - The busids list is empty.
OPENUSB_NO_RESOURCES - Memory allocation failure.