diff --git a/build.bat b/build.bat
index 9bfebda..736af51 100644
--- a/build.bat
+++ b/build.bat
@@ -106,7 +106,7 @@ echo oem=%OEM%
echo cpu=%CPU%
echo pid=%PID%
-if "%COMPILE_RANGE%"=="none" (
+if "%COMPILE_RANGE%"=="none" (
set dev=""
for /f "tokens=1,2,* " %%i in ('reg QUERY "HKEY_CLASSES_ROOT\CLSID\{2E1517DA-87BF-4443-984A-D2BF18F5A908}\LocalServer32" /ve') do set dev=%%k
echo dev=%dev%
@@ -119,10 +119,11 @@ call %dev%\..\..\..\vc\auxiliary\build\vcvars32.bat
)
"%~dp0\sln\release\hgsetver.exe" "%~dp0\..\sdk\include\huagao\brand.h" -oem %OEM% -cpu %CPU% -pid %PID% %COMPILE_RANGE% %NOT_INCREASE_VER%
-if %COMPILE_RANGE%=="none" (
-MSBuild.exe "%~dp0\device\scanner.vcxproj" /p:Configuration=Release /p:Platform=x86
-MSBuild.exe "%~dp0\sane\sane.vcxproj" /p:Configuration=Release /p:Platform=x86
+if %COMPILE_RANGE%=="none" (
+MSBuild.exe "%~dp0\device\scanner.vcxproj" /p:Configuration=Release /p:Platform=%CPU%
+MSBuild.exe "%~dp0\sane\sane.vcxproj" /p:Configuration=Release /p:Platform=%CPU%
)
-MSBuild.exe "%~dp0\twain\twain.vcxproj" /p:Configuration=Release /p:Platform=x86
+MSBuild.exe "%~dp0\twain\twain.vcxproj" /p:Configuration=Release /p:Platform=%CPU%
+:end
diff --git a/build_all.bat b/build_all.bat
index e92804f..c8e548c 100644
--- a/build_all.bat
+++ b/build_all.bat
@@ -1,39 +1,73 @@
echo off
+set CPU=x86
set OEM=""
set NOV=""
+
+if "%1"=="x86" (
+ set CPU=x86
+) else if "%1"=="x64" (
+ set CPU=x64
+) else if "%2"=="x86" (
+ set CPU=x86
+) else if "%2"=="x64" (
+ set CPU=x64
+) else if "%3"=="x86" (
+ set CPU=x86
+) else if "%3"=="x64" (
+ set CPU=x64
+)
+if "%1"=="hw" (
+ set OEM=%1
+) else if "%1"=="lsc" (
+ set OEM=%1
+) else if "%2"=="hw" (
+ set OEM=%2
+) else if "%2"=="lsc" (
+ set OEM=%2
+) else if "%3"=="hw" (
+ set OEM=%3
+) else if "%3"=="lsc" (
+ set OEM=%3
+)
if "%1"=="nov" (
- set NOV=%1
- set OEM=%2
-) else (
- set OEM=%1
- set NOV=%2
+ set NOV=%1
+) else if "%2"=="nov" (
+ set NOV=%2
+) else if "%3"=="nov" (
+ set NOV=%3
)
-if "%OEM%"=="hw" (
-build.bat hw x86 0x1000 %NOV%
-build.bat hw onlytwain 0x1002 nov
-build.bat hw onlytwain 0x7000 nov
-build.bat hw onlytwain 0x7002 nov
-build.bat hw onlytwain 0x7039 nov
-build.bat hw onlytwain 0x8000 nov
-build.bat hw onlytwain 0x9000 nov
-) else if "%OEM%" == "lsc" (
-build.bat lsc x86 0x8200 %NOV%
-build.bat lsc onlytwain 0x8420 nov
-build.bat lsc onlytwain 0x8429 nov
-build.bat lsc onlytwain 0x8520 nov
-build.bat lsc onlytwain 0x8529 nov
-build.bat lsc onlytwain 0x8620 nov
-build.bat lsc onlytwain 0x8629 nov
-build.bat lsc onlytwain 0x8730 nov
-build.bat lsc onlytwain 0x8739 nov
-) else (
-build.bat x86 0x100 %NOV%
-build.bat onlytwain 0x200 nov
-build.bat onlytwain 0x300 nov
-build.bat onlytwain 0x400 nov
-build.bat onlytwain 0x139 nov
-build.bat onlytwain 0x239 nov
-build.bat onlytwain 0x439 nov
-build.bat onlytwain 0x402 nov
+if "%CPU%"=="" (
+ set CPU=x86
+)
+
+echo build -cpu %CPU% -oem %OEM% %NOV%
+
+if "%OEM%"=="hw" (
+ build.bat hw %CPU% 0x1000 %NOV%
+ build.bat hw %CPU% onlytwain 0x1002 nov
+ build.bat hw %CPU% onlytwain 0x7000 nov
+ build.bat hw %CPU% onlytwain 0x7002 nov
+ build.bat hw %CPU% onlytwain 0x7039 nov
+ build.bat hw %CPU% onlytwain 0x8000 nov
+ build.bat hw %CPU% onlytwain 0x9000 nov
+) else if "%OEM%" == "lsc" (
+ build.bat lsc %CPU% 0x8200 %NOV%
+ build.bat lsc %CPU% onlytwain 0x8420 nov
+ build.bat lsc %CPU% onlytwain 0x8429 nov
+ build.bat lsc %CPU% onlytwain 0x8520 nov
+ build.bat lsc %CPU% onlytwain 0x8529 nov
+ build.bat lsc %CPU% onlytwain 0x8620 nov
+ build.bat lsc %CPU% onlytwain 0x8629 nov
+ build.bat lsc %CPU% onlytwain 0x8730 nov
+ build.bat lsc %CPU% onlytwain 0x8739 nov
+) else (
+ build.bat %CPU% 0x100 %NOV%
+ build.bat %CPU% onlytwain 0x200 nov
+ build.bat %CPU% onlytwain 0x300 nov
+ build.bat %CPU% onlytwain 0x400 nov
+ build.bat %CPU% onlytwain 0x139 nov
+ build.bat %CPU% onlytwain 0x239 nov
+ build.bat %CPU% onlytwain 0x439 nov
+ build.bat %CPU% onlytwain 0x402 nov
)
diff --git a/device/lib/x64/Debug/HG_OCR.lib b/device/lib/x64/Debug/HG_OCR.lib
new file mode 100644
index 0000000..fbe3775
Binary files /dev/null and b/device/lib/x64/Debug/HG_OCR.lib differ
diff --git a/device/lib/x64/Debug/IlmImf.lib b/device/lib/x64/Debug/IlmImf.lib
new file mode 100644
index 0000000..9a6df10
Binary files /dev/null and b/device/lib/x64/Debug/IlmImf.lib differ
diff --git a/device/lib/x64/Debug/IlmImf.pdb b/device/lib/x64/Debug/IlmImf.pdb
new file mode 100644
index 0000000..635c671
Binary files /dev/null and b/device/lib/x64/Debug/IlmImf.pdb differ
diff --git a/device/lib/x64/Debug/ittnotify.lib b/device/lib/x64/Debug/ittnotify.lib
new file mode 100644
index 0000000..7da0119
Binary files /dev/null and b/device/lib/x64/Debug/ittnotify.lib differ
diff --git a/device/lib/x64/Debug/ittnotify.pdb b/device/lib/x64/Debug/ittnotify.pdb
new file mode 100644
index 0000000..85b5d5d
Binary files /dev/null and b/device/lib/x64/Debug/ittnotify.pdb differ
diff --git a/device/lib/x64/Debug/leptonica.lib b/device/lib/x64/Debug/leptonica.lib
new file mode 100644
index 0000000..c0f264c
Binary files /dev/null and b/device/lib/x64/Debug/leptonica.lib differ
diff --git a/device/lib/x64/Debug/libjasper.lib b/device/lib/x64/Debug/libjasper.lib
new file mode 100644
index 0000000..3003536
Binary files /dev/null and b/device/lib/x64/Debug/libjasper.lib differ
diff --git a/device/lib/x64/Debug/libjasper.pdb b/device/lib/x64/Debug/libjasper.pdb
new file mode 100644
index 0000000..7f5e6db
Binary files /dev/null and b/device/lib/x64/Debug/libjasper.pdb differ
diff --git a/device/lib/x64/Debug/libjpeg-turbo.lib b/device/lib/x64/Debug/libjpeg-turbo.lib
new file mode 100644
index 0000000..b418c77
Binary files /dev/null and b/device/lib/x64/Debug/libjpeg-turbo.lib differ
diff --git a/device/lib/x64/Debug/libjpeg-turbo.pdb b/device/lib/x64/Debug/libjpeg-turbo.pdb
new file mode 100644
index 0000000..dc28301
Binary files /dev/null and b/device/lib/x64/Debug/libjpeg-turbo.pdb differ
diff --git a/device/lib/x64/Debug/libpng.lib b/device/lib/x64/Debug/libpng.lib
new file mode 100644
index 0000000..94546c2
Binary files /dev/null and b/device/lib/x64/Debug/libpng.lib differ
diff --git a/device/lib/x64/Debug/libpng.pdb b/device/lib/x64/Debug/libpng.pdb
new file mode 100644
index 0000000..28d4dc7
Binary files /dev/null and b/device/lib/x64/Debug/libpng.pdb differ
diff --git a/device/lib/x64/Debug/libtiff.lib b/device/lib/x64/Debug/libtiff.lib
new file mode 100644
index 0000000..ac6724a
Binary files /dev/null and b/device/lib/x64/Debug/libtiff.lib differ
diff --git a/device/lib/x64/Debug/libtiff.pdb b/device/lib/x64/Debug/libtiff.pdb
new file mode 100644
index 0000000..b80b6b8
Binary files /dev/null and b/device/lib/x64/Debug/libtiff.pdb differ
diff --git a/device/lib/x64/Debug/libwebp.lib b/device/lib/x64/Debug/libwebp.lib
new file mode 100644
index 0000000..49b9d1d
Binary files /dev/null and b/device/lib/x64/Debug/libwebp.lib differ
diff --git a/device/lib/x64/Debug/libwebp.pdb b/device/lib/x64/Debug/libwebp.pdb
new file mode 100644
index 0000000..f672a74
Binary files /dev/null and b/device/lib/x64/Debug/libwebp.pdb differ
diff --git a/device/lib/x64/Debug/log4cplusS.lib b/device/lib/x64/Debug/log4cplusS.lib
new file mode 100644
index 0000000..3e8f855
Binary files /dev/null and b/device/lib/x64/Debug/log4cplusS.lib differ
diff --git a/device/lib/x64/Debug/opencv_world3414.lib b/device/lib/x64/Debug/opencv_world3414.lib
new file mode 100644
index 0000000..13eb33f
Binary files /dev/null and b/device/lib/x64/Debug/opencv_world3414.lib differ
diff --git a/device/lib/x64/Debug/opencv_world3414.pdb b/device/lib/x64/Debug/opencv_world3414.pdb
new file mode 100644
index 0000000..9dfdd00
Binary files /dev/null and b/device/lib/x64/Debug/opencv_world3414.pdb differ
diff --git a/device/lib/x64/Debug/tiff.lib b/device/lib/x64/Debug/tiff.lib
new file mode 100644
index 0000000..fff6095
Binary files /dev/null and b/device/lib/x64/Debug/tiff.lib differ
diff --git a/device/lib/x64/Debug/zlib.lib b/device/lib/x64/Debug/zlib.lib
new file mode 100644
index 0000000..ce90e3c
Binary files /dev/null and b/device/lib/x64/Debug/zlib.lib differ
diff --git a/device/lib/x64/Debug/zlib.pdb b/device/lib/x64/Debug/zlib.pdb
new file mode 100644
index 0000000..315c694
Binary files /dev/null and b/device/lib/x64/Debug/zlib.pdb differ
diff --git a/device/lib/x64/Release/CyAPI.lib b/device/lib/x64/Release/CyAPI.lib
new file mode 100644
index 0000000..a888ef7
Binary files /dev/null and b/device/lib/x64/Release/CyAPI.lib differ
diff --git a/device/lib/x64/Release/HG_OCR.lib b/device/lib/x64/Release/HG_OCR.lib
new file mode 100644
index 0000000..ebb1d9e
Binary files /dev/null and b/device/lib/x64/Release/HG_OCR.lib differ
diff --git a/device/lib/x64/Release/IlmImf.lib b/device/lib/x64/Release/IlmImf.lib
new file mode 100644
index 0000000..0de0a68
Binary files /dev/null and b/device/lib/x64/Release/IlmImf.lib differ
diff --git a/device/lib/x64/Release/ittnotify.lib b/device/lib/x64/Release/ittnotify.lib
new file mode 100644
index 0000000..9297547
Binary files /dev/null and b/device/lib/x64/Release/ittnotify.lib differ
diff --git a/device/lib/x64/Release/leptonica.lib b/device/lib/x64/Release/leptonica.lib
new file mode 100644
index 0000000..84e2904
Binary files /dev/null and b/device/lib/x64/Release/leptonica.lib differ
diff --git a/device/lib/x64/Release/libjasper.lib b/device/lib/x64/Release/libjasper.lib
new file mode 100644
index 0000000..21d19e5
Binary files /dev/null and b/device/lib/x64/Release/libjasper.lib differ
diff --git a/device/lib/x64/Release/libjpeg-turbo.lib b/device/lib/x64/Release/libjpeg-turbo.lib
new file mode 100644
index 0000000..2a3e157
Binary files /dev/null and b/device/lib/x64/Release/libjpeg-turbo.lib differ
diff --git a/device/lib/x64/Release/libpng.lib b/device/lib/x64/Release/libpng.lib
new file mode 100644
index 0000000..73318dd
Binary files /dev/null and b/device/lib/x64/Release/libpng.lib differ
diff --git a/device/lib/x64/Release/libtiff.lib b/device/lib/x64/Release/libtiff.lib
new file mode 100644
index 0000000..5d612d5
Binary files /dev/null and b/device/lib/x64/Release/libtiff.lib differ
diff --git a/device/lib/x64/Release/libwebp.lib b/device/lib/x64/Release/libwebp.lib
new file mode 100644
index 0000000..e176983
Binary files /dev/null and b/device/lib/x64/Release/libwebp.lib differ
diff --git a/device/lib/x64/Release/log4cplusS.lib b/device/lib/x64/Release/log4cplusS.lib
new file mode 100644
index 0000000..1c6184b
Binary files /dev/null and b/device/lib/x64/Release/log4cplusS.lib differ
diff --git a/device/lib/x64/Release/opencv_world3414.lib b/device/lib/x64/Release/opencv_world3414.lib
new file mode 100644
index 0000000..ff59e17
Binary files /dev/null and b/device/lib/x64/Release/opencv_world3414.lib differ
diff --git a/device/lib/x64/Release/tiff.lib b/device/lib/x64/Release/tiff.lib
new file mode 100644
index 0000000..5941979
Binary files /dev/null and b/device/lib/x64/Release/tiff.lib differ
diff --git a/device/lib/x64/Release/zlib.lib b/device/lib/x64/Release/zlib.lib
new file mode 100644
index 0000000..c599d1e
Binary files /dev/null and b/device/lib/x64/Release/zlib.lib differ
diff --git a/device/scanner.rc b/device/scanner.rc
index fffa2d6..2f76f5a 100644
--- a/device/scanner.rc
+++ b/device/scanner.rc
@@ -51,8 +51,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 4,15,10000,22217
- PRODUCTVERSION 4,15,10000,22217
+ FILEVERSION 4,15,10100,22217
+ PRODUCTVERSION 4,15,10100,22217
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "宁波华高信息科技有限公司"
VALUE "FileDescription", "华高扫描仪应用程序"
- VALUE "FileVersion", "4.15.10000.22217"
+ VALUE "FileVersion", "4.15.10100.22217"
VALUE "InternalName", "scanner.dll"
- VALUE "LegalCopyright", "Copyright (C) 10000"
+ VALUE "LegalCopyright", "Copyright (C) 10100"
VALUE "OriginalFilename", "scanner.dll"
VALUE "ProductName", "HUAGOScan"
- VALUE "ProductVersion", "4.15.10000.22217"
+ VALUE "ProductVersion", "4.15.10100.22217"
END
END
BLOCK "VarFileInfo"
diff --git a/device/scanner.vcxproj b/device/scanner.vcxproj
index 9eb218f..230763b 100644
--- a/device/scanner.vcxproj
+++ b/device/scanner.vcxproj
@@ -164,16 +164,17 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
Level3
true
- HGSCANNER_EXPORT;CUSTOM_USBVIEW;OEM_NONE;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ HGSCANNER_EXPORT;CUSTOM_USBVIEW;OEM_NONE;_DIRECT_BUILD;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
4996;
+ MultiThreadedDebug
Console
true
-
-
- opencv_world3414.lib;IlmImf.lib;ittnotify.lib;leptonica.lib;libjasper.lib;libjpeg-turbo.lib;libpng.lib;libtiff.lib;libwebp.lib;log4cplusS.lib;quirc.lib;tiff.lib;zlib.lib;user32.lib
+ msvcprtd.lib;
+ opencv_world3414.lib;IlmImf.lib;ittnotify.lib;leptonica.lib;libjasper.lib;libjpeg-turbo.lib;libpng.lib;libtiff.lib;libwebp.lib;log4cplusS.lib;zlib.lib;user32.lib
+ $(ProjectDir)device.def
set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
@@ -191,9 +192,10 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
true
true
true
- HGSCANNER_EXPORT;CUSTOM_USBVIEW;OEM_NONE;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ HGSCANNER_EXPORT;CUSTOM_USBVIEW;OEM_NONE;NDEBUG;_CONSOLE;_DIRECT_BUILD;%(PreprocessorDefinitions)
true
4996;
+ MultiThreaded
Console
@@ -202,7 +204,8 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
true
- opencv_world3414.lib;IlmImf.lib;ittnotify.lib;leptonica.lib;libjasper.lib;libjpeg-turbo.lib;libpng.lib;libtiff.lib;libwebp.lib;log4cplusS.lib;quirc.lib;tiff.lib;zlib.lib;user32.lib
+ opencv_world3414.lib;IlmImf.lib;ittnotify.lib;leptonica.lib;libjasper.lib;libjpeg-turbo.lib;libpng.lib;libtiff.lib;libwebp.lib;log4cplusS.lib;zlib.lib;user32.lib
+ $(ProjectDir)device.def
set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
diff --git a/sane/DlgArea.cpp b/sane/DlgArea.cpp
index a3e5c4e..c3814c2 100644
--- a/sane/DlgArea.cpp
+++ b/sane/DlgArea.cpp
@@ -302,7 +302,13 @@ void dlg_area::clear_area(void)
void dlg_area::drag_blocks(std::vector& blocks)
{
int l = 5;
- DRAGRECT r = { user_sel_.left, user_sel_.top, user_sel_.left + l, user_sel_.top + l, DRAG_POS_LT };
+ DRAGRECT r;
+
+ r.left = user_sel_.left;
+ r.top = user_sel_.top;
+ r.right = r.left + 1;
+ r.bottom = r.top + 1;
+ r.pos = DRAG_POS_LT;
blocks.clear();
blocks.push_back(r);
diff --git a/sane/DlgPage.cpp b/sane/DlgPage.cpp
index d293ad5..2501af1 100644
--- a/sane/DlgPage.cpp
+++ b/sane/DlgPage.cpp
@@ -131,7 +131,7 @@ void dlg_base::on_font_changed(void)
}
void dlg_base::create(void)
{
- hwnd_ = CreateDialogParamW(g_my_inst, MAKEINTRESOURCE(idd_), parent_, &dlg_base::dlg_proc, (LPARAM)this);
+ hwnd_ = CreateDialogParamW(g_my_inst, MAKEINTRESOURCE(idd_), parent_, (DLGPROC)&dlg_base::dlg_proc, (LPARAM)this);
}
void dlg_base::notify_ui_event(int ev)
{
diff --git a/sane/sane.rc b/sane/sane.rc
index 38fb119..1bf39cd 100644
--- a/sane/sane.rc
+++ b/sane/sane.rc
@@ -248,8 +248,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 4,15,10000,22217
- PRODUCTVERSION 4,15,10000,22217
+ FILEVERSION 4,15,10100,22217
+ PRODUCTVERSION 4,15,10100,22217
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -266,12 +266,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "宁波华高信息科技有限公司"
VALUE "FileDescription", "华高扫描仪应用程序"
- VALUE "FileVersion", "4.15.10000.22217"
+ VALUE "FileVersion", "4.15.10100.22217"
VALUE "InternalName", "sane.dll"
- VALUE "LegalCopyright", "Copyright (C) 10000"
+ VALUE "LegalCopyright", "Copyright (C) 10100"
VALUE "OriginalFilename", "sane.dll"
VALUE "ProductName", "HUAGOScan"
- VALUE "ProductVersion", "4.15.10000.22217"
+ VALUE "ProductVersion", "4.15.10100.22217"
END
END
BLOCK "VarFileInfo"
diff --git a/sane/sane.vcxproj b/sane/sane.vcxproj
index ef17d2f..f7eea9e 100644
--- a/sane/sane.vcxproj
+++ b/sane/sane.vcxproj
@@ -41,13 +41,13 @@
Unicode
- Application
+ DynamicLibrary
true
v142
Unicode
- Application
+ DynamicLibrary
false
v142
true
@@ -156,12 +156,15 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
Level3
true
- _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions);BACKEND_NAME=hgsane;TWPP_IS_DS;EXPORT_SANE_API;OEM_NONE
true
+ 4996
Console
true
+ scanner.lib;%(AdditionalDependencies)
+ $(ProjectDir)sane.def
set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
@@ -179,14 +182,17 @@ move /Y "$(OutDirFullPath)$(ProjectName).pdb" "%FINAL_DIR%"
true
true
true
- NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ NDEBUG;_CONSOLE;%(PreprocessorDefinitions);BACKEND_NAME=hgsane;TWPP_IS_DS;EXPORT_SANE_API;OEM_NONE
true
+ 4996
Console
true
true
true
+ scanner.lib;%(AdditionalDependencies)
+ $(ProjectDir)sane.def
set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
diff --git a/sane/scanned_img.cpp b/sane/scanned_img.cpp
index cad3ffe..7cd6d3f 100644
--- a/sane/scanned_img.cpp
+++ b/sane/scanned_img.cpp
@@ -273,8 +273,8 @@ bool mapping_buf::save(const void* data, size_t* bytes, unsigned long long off)
}
bool mapping_buf::save(unsigned long long off, mapping_buf* mbuf, unsigned long long src_off)
{
- unsigned int len = (unsigned int)(mbuf->bytes() - src_off);
- unsigned char* buf = mbuf->buffer(src_off, &len);
+ size_t len = (unsigned int)(mbuf->bytes() - src_off);
+ unsigned char* buf = mbuf->buffer(src_off, (unsigned int*)&len);
bool ret = false;
while (buf && save(buf, &len, off))
@@ -287,7 +287,7 @@ bool mapping_buf::save(unsigned long long off, mapping_buf* mbuf, unsigned long
break;
}
len = (unsigned int)(mbuf->bytes() - src_off);
- buf = mbuf->buffer(src_off, &len);
+ buf = mbuf->buffer(src_off, (unsigned int*)&len);
}
return ret;
diff --git a/sln/hgscanner.sln b/sln/hgscanner.sln
index 2b52af6..dc15f3b 100644
--- a/sln/hgscanner.sln
+++ b/sln/hgscanner.sln
@@ -37,10 +37,12 @@ Global
{9ED4B425-73E0-423E-9712-455E777481B4}.Release|x64.Build.0 = Release|x64
{9ED4B425-73E0-423E-9712-455E777481B4}.Release|x86.ActiveCfg = Release|Win32
{9ED4B425-73E0-423E-9712-455E777481B4}.Release|x86.Build.0 = Release|Win32
- {C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}.Debug|x64.ActiveCfg = Debug|Win32
+ {C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}.Debug|x64.ActiveCfg = Debug|x64
+ {C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}.Debug|x64.Build.0 = Debug|x64
{C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}.Debug|x86.ActiveCfg = Debug|Win32
{C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}.Debug|x86.Build.0 = Debug|Win32
- {C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}.Release|x64.ActiveCfg = Release|Win32
+ {C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}.Release|x64.ActiveCfg = Release|x64
+ {C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}.Release|x64.Build.0 = Release|x64
{C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}.Release|x86.ActiveCfg = Release|Win32
{C3B47CE2-27CE-4509-AB59-3C0F194F0FCE}.Release|x86.Build.0 = Release|Win32
{A7528596-FBA2-4FFF-8649-C8D0EEBC6554}.Debug|x64.ActiveCfg = Debug|x64
diff --git a/twain/twain.vcxproj b/twain/twain.vcxproj
index b7b00cc..fe60c05 100644
--- a/twain/twain.vcxproj
+++ b/twain/twain.vcxproj
@@ -5,10 +5,18 @@
Debug
Win32
+
+ Debug
+ x64
+
Release
Win32
+
+ Release
+ x64
+
{c3b47ce2-27ce-4509-ab59-3c0f194f0fce}
@@ -25,6 +33,13 @@
Unicode
Static
+
+ DynamicLibrary
+ true
+ v142
+ Unicode
+ Static
+
DynamicLibrary
false
@@ -33,15 +48,29 @@
Unicode
Static
+
+ DynamicLibrary
+ false
+ true
+ v142
+ Unicode
+ Static
+
+
+
+
+
+
+
true
@@ -51,6 +80,14 @@
$(LibraryPath)
huagaotwain402.ds
+
+ $(LibraryPath)
+ huagaotwain402.ds
+ true
+ $(SolutionDir)..\..\sdk\include\;$(IncludePath)
+ $(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\
+ $(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\
+
false
$(SolutionDir)..\..\sdk\include\;$(IncludePath)
@@ -59,6 +96,14 @@
$(LibraryPath)
huagaotwain402.ds
+
+ $(LibraryPath)
+ huagaotwain402.ds
+ false
+ $(SolutionDir)..\..\sdk\include\;$(IncludePath)
+ $(SolutionDir)..\..\release\win\$(PlatformTarget)\OEM\huagao\
+ $(SolutionDir)..\..\tmp\$(PlatformTarget)\$(Configuration)\$(ProjectName)\
+
Use
@@ -84,6 +129,35 @@ move /Y "$(OutDirFullPath)$(TargetName).exp" "%FINAL_DIR%"
move /Y "$(OutDirFullPath)$(TargetName).lib" "%FINAL_DIR%"
move /Y "$(OutDirFullPath)$(TargetName).pdb" "%FINAL_DIR%"
move /Y "$(TargetPath)" "$(OutDirFullPath)$(TargetName)"
+copy "$(OutDirFullPath)$(TargetName)" "$(WinDir)\twain_32\HuaGoScan" /y
+
+
+
+
+ Use
+ Level3
+ Disabled
+ TWPP_NO_NOTES;TWPP_IS_DS;CUSTOM_USBVIEW;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)
+ true
+ 4996
+ pch.h
+ MultiThreadedDebugDLL
+ /bigobj %(AdditionalOptions)
+
+
+ Console
+ true
+ $(ProjectDir)twain.def
+
+
+
+
+ set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
+mkdir "%FINAL_DIR%"
+move /Y "$(OutDirFullPath)$(TargetName).exp" "%FINAL_DIR%"
+move /Y "$(OutDirFullPath)$(TargetName).lib" "%FINAL_DIR%"
+move /Y "$(OutDirFullPath)$(TargetName).pdb" "%FINAL_DIR%"
+move /Y "$(TargetPath)" "$(OutDirFullPath)$(TargetName)"
copy "$(OutDirFullPath)$(TargetName)" "$(WinDir)\twain_32\HuaGoScan" /y
@@ -114,6 +188,37 @@ mkdir "%FINAL_DIR%"
move /Y "$(OutDirFullPath)$(TargetName).exp" "%FINAL_DIR%"
move /Y "$(OutDirFullPath)$(TargetName).lib" "%FINAL_DIR%"
move /Y "$(OutDirFullPath)$(TargetName).pdb" "%FINAL_DIR%"
+move /Y "$(TargetPath)" "$(OutDirFullPath)$(TargetName)"
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ TWPP_NO_NOTES;TWPP_IS_DS;CUSTOM_USBVIEW;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)
+ true
+ 4996
+ pch.h
+ /bigobj %(AdditionalOptions)
+
+
+ Console
+ true
+ true
+ true
+ $(ProjectDir)twain.def
+
+
+
+
+ set FINAL_DIR=$(SolutionDir)..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration)\..\oem\huagao
+mkdir "%FINAL_DIR%"
+move /Y "$(OutDirFullPath)$(TargetName).exp" "%FINAL_DIR%"
+move /Y "$(OutDirFullPath)$(TargetName).lib" "%FINAL_DIR%"
+move /Y "$(OutDirFullPath)$(TargetName).pdb" "%FINAL_DIR%"
move /Y "$(TargetPath)" "$(OutDirFullPath)$(TargetName)"
@@ -171,11 +276,15 @@ move /Y "$(TargetPath)" "$(OutDirFullPath)$(TargetName)"
Create
+ Create
Create
+ Create
NotUsing
+ NotUsing
NotUsing
+ NotUsing