# Packages
# README
go-twain
NOTICE!
This library is no longer maintained. I was never able to get it working on any platform.
Go library mapping for the TWAIN protocol. It currently implements v2.4 of the protocol. You can view the header file (twain.h
) here.
This library provides a means of writing TWAIN applications that communicate via the DSM with Go (instead of C/C++).
My future goal is to port the DSM to Go as well.
This would avoid the need to link to a DLL/shared object, enabling you to build a Go app that communicates with a datasource (.ds
) file directly.
Caveats
The amount of testing I've done is limited. I literally just went through the twain.h
file line by line and created equivalent types/structs/constants in Go.
The following issues are bound to come up, most of which will be rectified with a DSM -> Go port:
- Since Go doesn't support
union
, I'm using a byte array (per the cgo documentation) - I didn't port the entry points/callbacks (e.g.
DSM_Entry
andDS_Entry
)
License
Licensed under the MIT license