[sane-devel] C#/Mono native binding to libsane

Jon Taylor jont at evrichart.com
Thu Aug 11 16:46:56 UTC 2011


Announcing the first ever (to my knowledge) native C# binding to libsane!

The project tries to abstract the SANE api out into an easy to use
programming interface utilizing namespaces and classes of varying
complexity.  The following namespaces are used:
SaneLow (Consists of a helper class for marshalling the data types and the
API class which wraps the pInvoke calls and various structs/enums)
Sane (High level representation of SANE objects)
Debugging (Does this need an explanation?)

The following high level classes are used to represent the core sane
library:
Core - sane_init, sane_exit, device listing
Device - sane_start, sane_close, sane_read, option listing
Option - Wraps the SANE_Option_Descriptor struct and abstracts
setting/getting values
Parameter - Wraps the SANE_Parameter struct
Range - Wraps the SANE_Range struct to deal with automatic handling of the
SANE_Fixed type in a range
Image - handles image acquisition (Ported from scanimage, but i got lazy
so buffering isn't handled yet)

SEE: http://code.google.com/p/sanedotnet for some sample code and to
download the sources (nothing but the base library code at this point)

Note: This is my first ever list post, so if i'm doing it all wrong -
sorry :(

Thanks,
Jon



More information about the sane-devel mailing list