[sane-devel] Number of devices
skelband at gmail.com
Thu Jan 28 15:41:14 GMT 2021
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?
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:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sane-devel