Skip to content

Commit

Permalink
Merge pull request #103 from dynarithmic/master-staging
Browse files Browse the repository at this point in the history
Master staging
  • Loading branch information
dynarithmic authored Aug 6, 2024
2 parents 0e1dda8 + 92669d0 commit a5c604d
Show file tree
Hide file tree
Showing 20 changed files with 66 additions and 28 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

* The Dynarithmic TWAIN Library is open source and licensed under the Apache 2.0 License. Please read the [LICENSE](https://github.com/dynarithmic/twain_library/tree/master/LICENSE) file for more information.
* The DTWAIN Library online help file can be found [here](https://www.dynarithmic.com/onlinehelp/dtwain/newversion/Dynarithmic%20TWAIN%20Library,%20Version%205.x.html).
* The current version is [**5.4.6** (See Version History)](https://github.com/dynarithmic/twain_library/tree/master/updates/updates.txt).
* The current version is [**5.4.7** (See Version History)](https://github.com/dynarithmic/twain_library/tree/master/updates/updates.txt).

**Please note that the source code and sample programs for the Dynarithmic TWAIN Library has moved to [this repository](https://github.com/dynarithmic/twain_library_source/tree/master)**.

Expand Down Expand Up @@ -63,12 +63,17 @@ For 64-bit applications, use the binaries found in **release_libraries.zip** in
Checksum values are found [here](https://github.com/dynarithmic/twain_library/blob/master/binaries/64bit/release_ziphashes64.txt).

----
The **release_libraries.zip** contains all of the DLL's required to start using DTWAIN for 32-bit and 64-bit applications. Similarly, the Visual C++ compatible import libraries necessary to build your 32-bit or 64-bit application (the files with the *.lib extension) are available.

(If you do not use Visual C++, see the [section on additional C++ compiler usage](#alternatecompilers) to alleviate the import library issues).
The **release_libraries.zip** contains all of the DLL's required to start using DTWAIN for 32-bit and 64-bit applications.

In addition, the release version of the Program Database (.PDB) files are available. This will aid in debugging any issues involving DTWAIN.

----
###### For C and C++ programmers:

If you are using Visual C++, the Visual C++ compatible import libraries necessary to build your 32-bit or 64-bit application (the files with the *.lib extension) are available.<br><br>
If you do not use Visual C++ but instead are using another brand of C++ compiler, see the [section on additional C++ compiler usage](#alternatecompilers) to alleviate the import library issues.


----

A breakdown of the files contained in **release_libraries.zip** is as follows:
Expand All @@ -86,7 +91,9 @@ A breakdown of the files contained in **release_libraries.zip** is as follows:
dtwain64u.dll -- 64-bit Unicode Dynamic Link Library
dtwain64u.lib -- 64-bit Unicode import library
dtwain64u.pdb -- 64-bit PDB files for dtwain64u.dll


###### For C and C++ programmers:

You will also need to include the header files found in the [c_cpp_includes](https://github.com/dynarithmic/twain_library/tree/master/c_cpp_includes) directory when building your application. Your build **INCLUDE** path should refer to these header files.

Basically, you just need to build your application and link it to one of the import libraries that matches the environment your application is targeted for. For example, if the application you're developing is a 32-bit, Unicode-based application, you would use the **dtwain32u.lib** file to allow your C/C++ application to link without errors.
Expand Down Expand Up @@ -485,7 +492,7 @@ We have language bindings (pinvoke's) for C# and Visual Basic. However we curre
----------
### Is there a C++ class wrapper for DTWAIN? ###

If you're a C++ programmer, and want a wrapper around the DTWAIN libarary, we do have a C++ wrapper for DTWAIN located in the <a href="https://github.com/dynarithmic/twain_library/tree/master/demos/cpp_wrapper" target="_blank">demos\cpp_wrapper_lib</a> directory. For more information, see the <a href="https://github.com/dynarithmic/twain_library/blob/master/demos/README.md" target="_blank">README.md</a> in the demos directory.
If you're a C++ programmer, and want a wrapper around the DTWAIN libarary, we do have a C++ wrapper for DTWAIN located in the <a href="https://github.com/dynarithmic/twain_library/tree/master/demos/cpp_wrapper_lib" target="_blank">demos\cpp_wrapper_lib</a> directory. For more information, see the <a href="https://github.com/dynarithmic/twain_library/blob/master/demos/README.md" target="_blank">README.md</a> in the demos directory.

----------

Expand Down
Binary file modified binaries/32bit/32bit_FullDemo.zip
Binary file not shown.
8 changes: 4 additions & 4 deletions binaries/32bit/32bit_FullDemo_hash.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MD5: ebf326a6010fbf3731496a9eda97edfb
SHA1: 7ba0f2ae361ee4e11a039cfe31ef18807283d841
SHA256: 12bd56e961a6713782992eee3b4544e8dfb7bbe3e6d85f62ae33ed3463425441
SHA512: 9957bbbba1e062f6a61de166ffbe999669537d68beca26c263451e9c0108979c144699007a6eda532451c8eb3bde2d51e52b8912c96031a043f914e36ab2fc8f
MD5: d6caf4457343f39847147a3b6724e287
SHA1: 2e7cdbf1d284d7f937b676eeda1ed73e662277ba
SHA256: 01e97b9c72beca33075ca1b2675b2acd3e658494134089ad159203847a8a4d8d
SHA512: 789ccd56829f71dcba84ecd1eb604bba499edde35c7174eea57cf262f4cac1d673f04a8a70e7a3e6bcaeb6733bfebc5ae09ea33640e750967bc1ae825d05c924
Binary file modified binaries/32bit/release_libraries.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions binaries/32bit/release_ziphashes32.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MD5 hash of "release_libraries.zip" (16 bytes) = 46ceba7a40826c4708a106611119d332
SHA1 hash of "release_libraries.zip" (20 bytes) = 15e70dfc43ef26541869a1871e4d098ae707fea5
SHA256 hash of "release_libraries.zip" (32 bytes) = 4a23fa8cf396a4cf73f67516e6a0de34b0d606996b04b651a468266bfda89a79
MD5 hash of "release_libraries.zip" (16 bytes) = 61d380d46ff6b01f60152e2f2aaf8885
SHA1 hash of "release_libraries.zip" (20 bytes) = 6b5325fde7f9f9dcd5f980737cbaad584e12587b
SHA256 hash of "release_libraries.zip" (32 bytes) = bf97da8c91c6f6b0425dc68a420578897fb7a4a995debc86cfa6842c45c27a67

Binary file modified binaries/64bit/64bit_FullDemo.zip
Binary file not shown.
8 changes: 4 additions & 4 deletions binaries/64bit/64bit_FullDemo_hash.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MD5: 108a12a571b1506b978be5fe79a1a885
SHA1: ab3b24f89ad778bfa2d30e456a709c1b7c0a66dc
SHA256: 9b5e1c019dfd090e4003a146c367434a657745b8a589ab790ba93c4aca42703b
SHA512: 0043d5d881ca9dac55eea5dcf072dcb7cabd9d1701bc6e13dc053e87da831f2312fbec87a13bb87b134f9ce586b80d80183c28ddecd12e08eead36bee13b7a9b
MD5: 7799f1c231387eb634d2ea6c54142d73
SHA1: a1176211b1582243870491e75c35633d0ee36c77
SHA256: 12c906d671db79b3960ab16f645d7dde647f5fe79eb5ed888f11e5a6d1e00fc2
SHA512: 7414f30c5f0bb122944f35f33e8be402bf5e5328e6235e2bb7ed95a9efb948207934b12cbe9f940c8372dde1865f28429b10f381d9afdbf8f2317b5bbe031e1a
Binary file modified binaries/64bit/release_libraries.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions binaries/64bit/release_ziphashes64.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MD5 hash of "release_libraries.zip" (16 bytes) = 99f70861a82c602584cd1811ba241989
SHA1 hash of "release_libraries.zip" (20 bytes) = 686c91d4d397ee33ea9f87bdc630536441aa2027
SHA256 hash of "release_libraries.zip" (32 bytes) = f6892b52e883b9da9b731544027bb4df5e3dd46fd73dd80c26e741360fa71672
MD5 hash of "release_libraries.zip" (16 bytes) = 9fdeada30b4fcee9ef918a9a242237e3
SHA1 hash of "release_libraries.zip" (20 bytes) = 31ef17ed78cef997ef1b96893caec366d3ac1136
SHA256 hash of "release_libraries.zip" (32 bytes) = 4b4b96aa92222973498036b7c9e92eb0fc3021f772f338fd75fa28c034e435e1

2 changes: 1 addition & 1 deletion c_cpp_includes/dtwain_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#define DTWAIN_MAJOR_VERSION 5
#define DTWAIN_MINOR_VERSION 4
#define DTWAIN_PATCHLEVEL_VERSION 6
#define DTWAIN_PATCHLEVEL_VERSION 7

#define DTWAIN_TEXTRESOURCE_MIN_MAJOR_VERSION 5
#define DTWAIN_TEXTRESOURCE_MIN_MINOR_VERSION 4
Expand Down
20 changes: 14 additions & 6 deletions demos/c/dtwdemo/dtwdemo.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ void SelectTheSource(int nWhich)
switch (nWhich)
{
case IDM_SELECT_SOURCE:
tempSource = DTWAIN_SelectSource();
tempSource = DTWAIN_SelectSource2(NULL, _T("Select Source"),0,0,DTWAIN_DLG_CENTER_SCREEN);
break;

case IDM_SELECT_DEFAULT_SOURCE:
Expand Down Expand Up @@ -489,9 +489,10 @@ void AcquireFile(BOOL bUseSource)
LONG ErrStatus;
LONG FileFlags = DTWAIN_USELONGNAME;
LONG FileType;
BOOL bError;
BOOL bAcquireOK = TRUE;
DTWAIN_ARRAY AFileNames = 0;
BOOL UseUI;
TCHAR szError[256];

if ( bUseSource )
{
Expand Down Expand Up @@ -567,26 +568,33 @@ void AcquireFile(BOOL bUseSource)

/* Acquire the file */
UseUI = GetToggleMenuState(IDM_USE_SOURCE_UI);
bError = DTWAIN_AcquireFileEx(g_CurrentSource,
bAcquireOK = DTWAIN_AcquireFileEx(g_CurrentSource,
AFileNames,
FileType,
FileFlags,
FileFlags | DTWAIN_CREATE_DIRECTORY,
DTWAIN_PT_DEFAULT, /* Use default */
DTWAIN_ACQUIREALL, /* Get all pages */
UseUI,
TRUE, /* Close Source when UI is closed */
&ErrStatus /* Error Status */
);
if (!bAcquireOK)
{
DTWAIN_GetErrorString(DTWAIN_GetLastError(), szError, 255);
}
WaitLoop();
EnableWindow(g_hWnd, TRUE);

/* Reopen source since we closed it after the acquisition
(to be safe) */
DTWAIN_ArrayDestroy( AFileNames );
DTWAIN_OpenSource( g_CurrentSource );
if ( !bError || nPageCount == 0 || !bPageOK )
if ( !bAcquireOK || nPageCount == 0 || !bPageOK )
{
MessageBox(g_hWnd, _T("No Images Acquired"), _T(""), MB_ICONSTOP);
if ( !bAcquireOK)
MessageBox(g_hWnd, szError, _T(""), MB_ICONSTOP);
else
MessageBox(g_hWnd, _T("No Images Acquired"), _T(""), MB_ICONSTOP);
return;
}
else
Expand Down
2 changes: 1 addition & 1 deletion demos/c_cpp_includes/dtwain_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#define DTWAIN_MAJOR_VERSION 5
#define DTWAIN_MINOR_VERSION 4
#define DTWAIN_PATCHLEVEL_VERSION 6
#define DTWAIN_PATCHLEVEL_VERSION 7

#define DTWAIN_TEXTRESOURCE_MIN_MAJOR_VERSION 5
#define DTWAIN_TEXTRESOURCE_MIN_MINOR_VERSION 4
Expand Down
2 changes: 2 additions & 0 deletions text_resources/twainresourcestrings_dutch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
3013 Output: return code from DSM
3014 No information for
3015 returned error code
3016 Fout
3017 Tijdelijke bestandsmap bestaat niet
5000 Courier
5001 Courier-Bold
5002 Courier-BoldOblique
Expand Down
2 changes: 2 additions & 0 deletions text_resources/twainresourcestrings_english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@
3013 Output: return code from DSM
3014 No information for
3015 returned error code
3016 Error
3017 Temporary file directory does not exist
5000 Courier
5001 Courier-Bold
5002 Courier-BoldOblique
Expand Down
2 changes: 2 additions & 0 deletions text_resources/twainresourcestrings_french.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@
3013 Output: return code from DSM
3014 No information for
3015 returned error code
3016 Erreur
3017 Le r�pertoire de fichiers temporaires n'existe pas
5000 Courier
5001 Courier-Bold
5002 Courier-BoldOblique
Expand Down
2 changes: 2 additions & 0 deletions text_resources/twainresourcestrings_german.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
3013 Output: return code from DSM
3014 No information for
3015 returned error code
3016 Fehler
3017 Das tempor�re Dateiverzeichnis existiert nicht
5000 Courier
5001 Courier-Bold
5002 Courier-BoldOblique
Expand Down
2 changes: 2 additions & 0 deletions text_resources/twainresourcestrings_italian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
3013 Output: return code from DSM
3014 No information for
3015 returned error code
3016 Errore
3017 La directory dei file temporanei non esiste
5000 Courier
5001 Courier-Bold
5002 Courier-BoldOblique
Expand Down
2 changes: 2 additions & 0 deletions text_resources/twainresourcestrings_portuguese_br.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
3013 Sa�da: c�digo de retorno do DSM
3014 No information for
3015 returned error code
3016 Erro
3017 O diret�rio de arquivos tempor�rios n�o existe
5000 Courier
5001 Courier-Bold
5002 Courier-BoldOblique
Expand Down
2 changes: 2 additions & 0 deletions text_resources/twainresourcestrings_spanish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
3013 Output: return code from DSM
3014 No information for
3015 returned error code
3016 Error
3017 El directorio de archivos temporales no existe
5000 Courier
5001 Courier-Bold
5002 Courier-BoldOblique
Expand Down
9 changes: 9 additions & 0 deletions updates/updates.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
DTWAIN Version changes

5.4.7

- Fixed issue with loading 32-bit TWAINDSM.DLL if only found on the system path.

- Fixed issue with some DTWAIN API calls not retaining error codes when DTWAIN_GetLastError() is invoked.

- Added additional resource strings to the twainresourcestrings_* resource files.


5.4.6

- Increase width of the label field in the TWAIN "Select Source" dialog when using DTWAIN_SelectSource2()
Expand Down

0 comments on commit a5c604d

Please sign in to comment.