- Topics - 3
- Replies - 66
- Total Posts - 69
…can u plz sample source code for mac ..jst for load the library and open datasource…
Are you implementing a Macintosh application or a Data Source?
In either case, study up on the TWAIN spec (search for Mac) and this Technical Note:
TWAIN Data Sources for Mac OS X
Apple provides sample code for a DS…
…but I couldn’t find sample code for an application. I’ve only implemented DS’s so I can’t help you there.
The DSM will be loaded automatically at load-time if you link it into your XCode project (app or DS). The DSM is a OS X framework located here: /System/Library/Frameworks/TWAIN.framework
Once you do that, you can simply #include the TWAIN.h header file (which is embedded in the framework) in you cpp files and make C function calls to the DSM.
By the way, don’t bother with the DSM provided by the TWG on twain.org. Apple includes the DSM framework with OS X 10.2 and later.