调整老版sdk接口调整c#demo

This commit is contained in:
13038267101 2022-11-19 11:49:41 +08:00
parent 0110ccb38a
commit 12ad060082
11 changed files with 265 additions and 66 deletions

View File

@ -30,6 +30,7 @@ namespace WinFormsApp1
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// button1
@ -42,15 +43,25 @@ namespace WinFormsApp1
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(352, 211);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(96, 28);
this.button2.TabIndex = 1;
this.button2.Text = "button2";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
}
@ -58,6 +69,7 @@ namespace WinFormsApp1
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
}
}

View File

@ -21,10 +21,9 @@ namespace WinFormsApp1
scan.scanExec();
}
private void Form1_Load(object sender, EventArgs e)
private void button2_Click(object sender, EventArgs e)
{
scan.stopscan();
}
}
}

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
@ -188,14 +188,14 @@ namespace DNScanner.Scan
HG_XFERFILE /* 图像文件保存图像信息 */
};
[StructLayout(LayoutKind.Sequential, Pack = 8)]
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct HG_FILLHOLE
{
public int enable; /* 使能开启该功能为true关闭该功能为false */
public int ratio; /* 穿孔搜索范围从边缘到页面中心比例1~50对应1%~50% */
};
[StructLayout(LayoutKind.Sequential, Pack = 8)]
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct HG_HARDWARECAPS
{
public int capturepixtype; /* 颜色模式 */
@ -203,7 +203,7 @@ namespace DNScanner.Scan
public int bindingDetection; /* 订书钉检测 */
};
[StructLayout(LayoutKind.Sequential, Pack = 8)]
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct HG_SCANSIDE
{
public int Duplex; /* 1: both ; 0: front */
@ -213,7 +213,7 @@ namespace DNScanner.Scan
public int SwitchFrontBack; /* 互换正反面 0:disable 1: enbale */
};
[StructLayout(LayoutKind.Sequential, Pack = 8)]
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct HG_IMG
{
public int width; /* 像素宽度 */
@ -224,7 +224,7 @@ namespace DNScanner.Scan
public int bufferlength; /*bmp buffer 长度*/
};
[StructLayout(LayoutKind.Sequential, Pack = 8)]
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct HG_IMAGEPROCESS
{
public int AutoCrop; /* 自动裁剪尺寸 */
@ -255,7 +255,7 @@ namespace DNScanner.Scan
public int DiscardBlankThre; /* 跳过空白页阈值 */
};
[StructLayout(LayoutKind.Sequential, Pack = 8)]
[StructLayout(LayoutKind.Sequential, Pack = 4)]
public struct HG_SCANPARAMS
{
public HG_COLORMODE PixelType; /* 色彩:彩色/灰度/黑白 */
@ -281,7 +281,7 @@ namespace DNScanner.Scan
public int initDriver()
{
HG_Init();
return 0;
}
@ -296,7 +296,6 @@ namespace DNScanner.Scan
public void initInstance()
{
HG_Init();
string aa = "";
var ret = HG_GetDevices(aa);
selectedScanner = Marshal.PtrToStringAnsi(ret);
@ -338,7 +337,8 @@ namespace DNScanner.Scan
//设置当前使用的配置项
scanParams.PixelType = HG_COLORMODE.HG_Gray;
scanParams.PixelType = HG_COLORMODE.HG_RGB;
scanParams.MultiOutput = HG_MULTIOUTPUT.HG_Unused;
scanParams.PaperSize = HG_PAPERTYPE.HG_None;
scanParams.PaperAlign = (HG_PAPERALIGN.HG_Rot0);
@ -398,16 +398,16 @@ namespace DNScanner.Scan
// 从图像数据生成文件
byte[] data = new byte[image.bufferlength];
Marshal.Copy(image.pimgdata, data, 0, image.bufferlength);
for (int i = 0; i < 12; i++)
{
//logger.Debug("Byte content is: " + data[i]);
}
//for (int i = 0; i < 12; i++)
//{
// //logger.Debug("Byte content is: " + data[i]);
//}
var ptr= Marshal.UnsafeAddrOfPinnedArrayElement(data, 0);
Bitmap bmp;
using (var stream = new MemoryStream(data))
{
bmp = new Bitmap(stream);
System.Drawing.Imaging.Encoder myEncoder;
// Bitmap bmp;
//using (var stream = new MemoryStream(data))
//{
// bmp = new Bitmap(stream);
/* System.Drawing.Imaging.Encoder myEncoder;
EncoderParameter myEncoderParameter;
EncoderParameters myEncoderParameters;
ImageCodecInfo myImageCodecInfo =
@ -416,10 +416,19 @@ namespace DNScanner.Scan
myEncoder = System.Drawing.Imaging.Encoder.Compression;
myEncoderParameters = new EncoderParameters(1);
myEncoderParameter = new EncoderParameter(myEncoder, 95);
myEncoderParameters.Param[0] = myEncoderParameter;
bmp.Save((imgindex++).ToString() + ".tif", myImageCodecInfo, myEncoderParameters);
myEncoderParameters.Param[0] = myEncoderParameter;*/
// bmp.Save((imgindex++).ToString() + ".jpg");
//bmp.Save((imgindex++).ToString() + ".jpg", ImageFormat.Bmp);
}
//}
System.IO.MemoryStream ms = new System.IO.MemoryStream(data);
System.Drawing.Image img1 = System.Drawing.Image.FromStream(ms);
//保存到磁盘文件
string imagePath = System.IO.Path.Combine();
// if (!System.IO.Directory.Exists(imagePath))
// System.IO.Directory.CreateDirectory(imagePath);
img1.Save(System.IO.Path.Combine(imagePath, (imgindex++).ToString() + ".jpg"), System.Drawing.Imaging.ImageFormat.Jpeg);
ms.Dispose();
// MessageBox.Show("图片已保存至:" + m_ImagrRootDir);
//bmp.Save(imgindex.ToString() + ".bmp", ImageFormat.Bmp);
//bmp.Save(destFileName, ImageFormat.Tiff);
@ -491,19 +500,32 @@ namespace DNScanner.Scan
{
TimelySetParams();
HG_Set_AquireImg_callback(imageCallback, IntPtr.Zero);
// 输入参数 -1: 连续扫描 >=1: 指定页数
int retVal = HG_StartScan(scannerHandle, 65536);
int retVal = HG_StartScan(scannerHandle, -1);
if (retVal != 0)
{
MessageBox.Show("扫描时发生错误,错误码: " + retVal);
}
HG_Set_AquireImg_callback(imageCallback, IntPtr.Zero);
return retVal;
}
public int stopscan()
{
// 重置扫描状态
int retVal = HG_StopScan(scannerHandle);
if (retVal != 0)
{
}
// HG_CloseScanner();
// scannerHandle = IntPtr.Zero;
return retVal; ;
}
protected int scanCancel()
{

View File

@ -28,17 +28,17 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
@ -65,9 +65,11 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>D:\webscan\lib-huagao-webscan-master\demo\C++TestDemo\x86\Debug</OutDir>
<IntDir>D:\webscan\lib-huagao-webscan-master\demo\C++TestDemo\x86\Debug</IntDir>
<OutDir>$(SolutionDir)x86\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)x86\$(Configuration)\</IntDir>
<TargetName>$(ProjectName)d</TargetName>
<IncludePath>..\..\..\hgscannersdk;$(IncludePath)</IncludePath>
<LibraryPath>..\..\..\lib;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
@ -94,8 +96,8 @@
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>hgscannersdkd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>hgscannersdk.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

View File

@ -10,17 +10,16 @@
#include "imgfmt/HGImgFmt.h"
#include "huagao/hgscanner_error.h"
#include <vector>
#include "opencv2/opencv.hpp"
#include <opencv2/opencv.hpp>
#include "assert.h"
using namespace std;
#define SCAN_PTR(ptr) ((GScanO200 *)ptr)
HG_SCANPARAMS m_params;
std::string m_device_mode = "G100";
std::string img_type_ = ".jpg";
std::string scannerName = "HUAGO G100 Scanner";
void* m_obj_usb = nullptr;
void* m_obj_img = nullptr;
static const char* SDKVersion = "1.22.9.30";
char deviceList[60];
HG_OnDevice_Event_Callback m_callback_OnDevcie_Event = nullptr;
HG_OnImage_Callback m_callback_OnImage_Event = nullptr;
@ -70,8 +69,11 @@ static void HGAPI DeviceScanImageFunc(HGLibDevice device, HGLibImage image, HGPo
{
cv::cvtColor(mat, mat, cv::COLOR_RGB2BGR);
}
cv::imencode(img_type_, mat, bmpdata);
vector<int>compress;
compress.push_back(CV_IMWRITE_JPEG_QUALITY);
compress.push_back(80); //图像压缩参数该参数取值范围为0-100数值越高图像质量越高
cv::imencode(img_type_, mat, bmpdata, compress);
img.height = mat.rows; //info.height
img.width = mat.cols;// info.width;
@ -143,7 +145,6 @@ static void HGAPI DeviceScanEvent(HGLibDevice device, HGUInt event, HGBool err,
}
}
}
void HG_Init()
{
//初始化
@ -194,7 +195,6 @@ void HG_Init()
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
printf("ret:%d\r\n", ret);
}
void HG_ImgSaveType(const char* img_type)
{
if (img_type)
@ -210,9 +210,6 @@ void HG_ImgSaveType(const char* img_type)
}
}
}
char deviceList[60];
char* HG_GetDevices(char* strSeperator)
{
HGChar** devNameList = HGLib_GetDeviceNameList();
@ -226,17 +223,15 @@ char* HG_GetDevices(char* strSeperator)
HGLib_ReleaseDeviceNameList(devNameList);
return deviceList;
}
HG_Scanner_Handle HG_OpenScanner(char* scannername)
{
return (HG_Scanner_Handle)HGLib_OpenDevice(scannername);
}
void HG_CloseScanner(HG_Scanner_Handle pScanner)
{
HGLib_CloseDevice((HGLibDevice)pScanner);
}
int HG_ParamsToHGlib(HG_Scanner_Handle pScanner)
int GetDeviceParam(HG_Scanner_Handle pScanner)
{
HGUInt count = 0;
HGLibDeviceParamGroup* group = HGLib_GetDeviceParamGroupList((HGLibDevice)pScanner, &count);
@ -469,7 +464,7 @@ int HG_ParamsToHGlib(HG_Scanner_Handle pScanner)
HGLib_ReleaseDeviceParamGroupList(group, count);
return 0;
}
int set(HG_Scanner_Handle pScanner)
int SetDeviceParam(HG_Scanner_Handle pScanner)
{
HGUInt enumValue = 0;
HGBool boolValue = false;
@ -746,22 +741,20 @@ int set(HG_Scanner_Handle pScanner)
return ret ? 0 : -1;
}
int HG_Get_Scan_Params(HG_Scanner_Handle pScanner, HG_SCANPARAMS* param)
{
if (NULL == param)
return -1;
HG_ParamsToHGlib(pScanner);
GetDeviceParam(pScanner);
*param = m_params;
return 0;
}
int HG_Set_Scan_Params(HG_Scanner_Handle pScanner, HG_SCANPARAMS param)
{
m_params = param;
int ret = set(pScanner);
int ret = SetDeviceParam(pScanner);
return ret;
}
int HG_StartScan(HG_Scanner_Handle pScanner, int count)
{
HGBool ret = false;
@ -791,39 +784,32 @@ int HG_StartScan(HG_Scanner_Handle pScanner, int count)
return HGLib_StartDeviceScan((HGLibDevice)pScanner, DeviceScanEvent, 0, DeviceScanImageFunc, 0) ? 0 : -1;
}
int HG_StopScan(HG_Scanner_Handle pScanner)
{
return HGLib_StopDeviceScan((HGLibDevice)pScanner) ? 0 : -1;
}
int HG_Is_Running(HG_Scanner_Handle pScanner)
{
return 0;
}
int HG_Is_FeederLoaded(HG_Scanner_Handle pScanner)
{
return HGLib_DeviceIsPaperOn((HGLibDevice)pScanner) ? 1 : 0;
}
void HG_Set_AquireImg_callback(HG_OnImage_Callback onimg_callback, void* obj)
{
m_obj_img = obj;
m_callback_OnImage_Event = onimg_callback;
}
void HG_Set_OnDeviceEvent_callback(HG_OnDevice_Event_Callback onevent_callback, void* obj)
{
m_obj_usb = obj;
m_callback_OnDevcie_Event = onevent_callback;
}
char* HG_GetSDKVersion()
{
return const_cast<char*>(SDKVersion);
}
const char* HG_GetSerialNum(HG_Scanner_Handle pScanner)
{
static HGChar sn[256] = { 0 };
@ -833,7 +819,6 @@ const char* HG_GetSerialNum(HG_Scanner_Handle pScanner)
return sn;
}
const char* HG_GetFwVersion(HG_Scanner_Handle pScanner)
{
static HGChar fwVersion[256] = { 0 };
@ -843,7 +828,6 @@ const char* HG_GetFwVersion(HG_Scanner_Handle pScanner)
return fwVersion;
}
int HG_GET_IS_SLEEP_STATUS(HG_Scanner_Handle pScanner)
{
/*if (pScanner == nullptr || m_scanner.get() == nullptr || pScanner != m_scanner.get())
@ -864,7 +848,6 @@ int HG_GET_IS_SLEEP_STATUS(HG_Scanner_Handle pScanner)
return 0;
//}
}
int HG_REBOOT_DEVICE(HG_Scanner_Handle pScanner)
{
return HGLib_DeviceRestart(HGLibDevice(pScanner)) ? 1 : -1;
@ -905,7 +888,6 @@ int HG_REBOOT_DEVICE(HG_Scanner_Handle pScanner)
TIFFWriteScanline(tif_file, imgData + image.step * i, static_cast<uint>(i));
TIFFWriteDirectory(tif_file);//write page
}*/
DLL_HG_SCHANNER_API int HG_Create_MultiTiff(char** srcFiles, int srcnum, char* dstFile)
{
/*int ret = 0;

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32616.157
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hgscannersdk", "hgscannersdk.vcxproj", "{B1B431D3-9D68-41A3-8993-6BD20C6C7294}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B1B431D3-9D68-41A3-8993-6BD20C6C7294}.Debug|x64.ActiveCfg = Debug|x64
{B1B431D3-9D68-41A3-8993-6BD20C6C7294}.Debug|x64.Build.0 = Debug|x64
{B1B431D3-9D68-41A3-8993-6BD20C6C7294}.Debug|x86.ActiveCfg = Debug|Win32
{B1B431D3-9D68-41A3-8993-6BD20C6C7294}.Debug|x86.Build.0 = Debug|Win32
{B1B431D3-9D68-41A3-8993-6BD20C6C7294}.Release|x64.ActiveCfg = Release|x64
{B1B431D3-9D68-41A3-8993-6BD20C6C7294}.Release|x64.Build.0 = Release|x64
{B1B431D3-9D68-41A3-8993-6BD20C6C7294}.Release|x86.ActiveCfg = Release|Win32
{B1B431D3-9D68-41A3-8993-6BD20C6C7294}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {13FE8D7E-85DE-4431-9025-2283CBDE250B}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<ProjectGuid>{B1B431D3-9D68-41A3-8993-6BD20C6C7294}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)x86\$(Configuration)\</OutDir>
<IncludePath>..\..\..\..\..\sdk\include;$(SolutionDir)..\..\..\..\..\sdk\include\opencv\;$(IncludePath)</IncludePath>
<IntDir>$(SolutionDir)x86\$(Configuration)\</IntDir>
<LibraryPath>$(ProjectDir)..\..\..\..\..\sdk\lib\win\$(PlatformTarget)\$(Configuration);$(ProjectDir)..\..\..\..\build\windows\Debug;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;HGSCANNERSDK_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<Optimization>Disabled</Optimization>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>opencv_core3416.lib;opencv_imgproc3416.lib;opencv_imgcodecs3416.lib;IlmImf.lib;ittnotify.lib;libjasper.lib;libjpeg-turbo.lib;libpng.lib;libtiff.lib;libwebp.lib;zlib.lib;user32.lib;HGBase.lib;HGImgProc.lib;HGImgFmt.lib;HGScannerLib.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>msvcp140d.dll;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
<PostBuildEvent>
<Command>copy "$(TargetPath)" "..\..\lib"
copy "$(SolutionDir)x86\$(Configuration)\hgscannersdk.lib" "..\..\lib"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;HGSCANNERSDK_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<TargetMachine>MachineX86</TargetMachine>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\hgscannersdk\HG_SCANNER_API.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\hgscannersdk\HG_SCANNER_API.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\hgscannersdk\HG_SCANNER_API.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\hgscannersdk\HG_SCANNER_API.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>