[sane-devel] On certain functions

Major A andras at users.sourceforge.net
Sun Dec 14 02:33:22 GMT 2003


> Sorry if this sounds weird, but what kind of device number exactly
> goes in the parameter for the function, sanei_usb_open()?  Can I
> write:

You don't give a number, you give a pointer to a SANE_Int, as
sane/sanei_usb.h tells you:

  extern SANE_Status sanei_usb_open (SANE_String_Const devname, SANE_Int * dn);

> int Dev_num = 48;
> sanei_usb_open("/Path/to/device", Dev_Num);

Rather like this:

  int fd;
  sanei_usb_open("/Path/to/device", &fd);

After that fd will be the device handle of your opened USB device.

  Andras

===========================================================================
Major Andras
    e-mail: andras at users.sourceforge.net
    www:    http://andras.webhop.org/
===========================================================================




More information about the sane-devel mailing list