next up previous contents index
次へ: sane_open 上へ: Operations 戻る: sane_exit   目次   索引

sane_get_devices

This function can be used to query the list of devices that are available. If the function executes successfully, it stores a pointer to a NULL terminated array of pointers to SANE_Device structures in *device_list. The returned list is guaranteed to remain unchanged and valid until (a) another call to this function is performed or (b) a call to sane_exit() is performed. This function can be called repeatedly to detect when new devices become available. If argument local_only is true, only local devices are returned (devices directly attached to the machine that SANE is running on). If it is false, the device list includes all remote devices that are accessible to the SANE library.

SANE_Status sane_get_devices (const SANE_Device *** device_list,
                              SANE_Bool local_only);

This function may fail with SANE_STATUS_NO_MEM if an insufficient amount of memory is available.

Backend Implementation Note
SANE does not require that this function is called before a sane_open() call is performed. A device name may be specified explicitly by a user which would make it unnecessary and undesirable to call this function first.


next up previous contents index
次へ: sane_open 上へ: Operations 戻る: sane_exit   目次   索引
MATSUBAYASHI 'Shaolin' Kohji 平成14年10月29日