- Topics - 3
- Replies - 66
- Total Posts - 69
I have succesfully implemeted the twain in windows.now i have to do the same thing in mac side,when i am going to compile the same C++ source in mac side it gives errors,actually im using winnt.h winuser.h header files,so what can i use for these in mac..
You can’t just recompile your code for Mac. To support both OS’s, you’ll need to be very familiar with the TWAIN specification and both OS’s. All of the Windows operating system calls in your code need to be replaced/reworked to use Mac OS calls including all of your GUI implementation.
For example, Capability memory allocation on Mac uses NewHandle() while on Windows GlobalAlloc() is used. You’ll need to find these differences in your code and make the appropriate changes.
You might be able to share some code if you’re careful to isolate the OS calls but it may not be worth the extra effort.
I have implemented DS’s on both OS’s so I speak from experience.