Hi, On 2021-01-28 6:40 a.m., Thiago Milczarek Sayão wrote: > Warning: Might be a stupid question. > > const SANE_Device **dev_list; > sane_get_devices(&dev_list, SANE_FALSE); > > How do I get the size of dev_list? > > Thanks.
There is no length parameter. If you just wish to count the devices, loop through it until you get to a NULL pointer. You can find an example in the SANE backends source for scanimage: frontend/scanimage.c around line 2184. Have you read the SANE API spec? If not, it is here: https://sane-project.gitlab.io/standard/ Cheers, Ralph
