C++ Examples

Top  Previous  Next

These examples are simple Windows (Win32) console programs.  Make sure that when setting up to try the examples, your compiler settings are for generating Win32 Console applications.  If not, you will more than likely get a linker error (something like "WinMain" not being defined).

 

In the examples, there are no dependencies on libraries such as MFC or OWL.  However, you can use the DTWAIN classes safely in any MFC, OWL, ATL, etc., application since the interface is generic C++ with some Windows types and API calls included (for example LONG and LoadLibrary( )).

 

Note that these examples demonstrate basic usage of the DTWAIN C++ libraries.  There are many functions that may not be illustrated here.  Please consult the rest of this documentation for other functions that are included in the DTWAIN C++ libraries.  For brevity, there is no checking done for return error codes.  Your application should always check if a function is successful or not.

 

Also, the C++ version of the DTWAIN examples (in the /Examples/CPP directory of the DTWAIN installation) have been rewritten to use the new C++ classes.  You can view these examples to further gain knowledge on the usage of the new C++ interface.