tags:

views:

18

answers:

0

I am trying to call the C function sane_get_devices from Java using JNA

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

Where SANE_Status is an int and SANE_Device is a structure.

typedef struct
{
  SANE_String_Const name;     /* unique device name */
  SANE_String_Const vendor;   /* device vendor string */
  SANE_String_Const model;    /* device model name */
  SANE_String_Const type;     /* device type (e.g., "flatbed scanner") */
}
SANE_Device;

How do I call this function in Java using JNA?

The full sane.h header file can be found http://git.debian.org/?p=sane/sane-backends.git;a=blob;f=include/sane/sane.h;h=5320b4a5fbbe46ea2403f1623be2a9c962b1a590;hb=HEAD

Documentation for the sane_get_devices http://www.sane-project.org/html/doc012.html