张洋 5 лет назад
Родитель
Сommit
fbab7e32a2

BIN
bin/Win32/Release/zhipuzi_pay_plugin/zhipuzi_pay_plugin.exe


BIN
bin/Win32/Release/zhipuzi_pay_plugin/zpzDll.dll


BIN
lib/debug/zpzDll.lib


BIN
lib/release/zpzDll.lib


+ 2 - 0
zhipuzi_pay_plugin/wnd/CValueWnd.cpp

@@ -341,6 +341,8 @@ void CValueWnd::StartOcrWork()
 				if (!atof(ocr_result.c_str()))
 				{
 					//识别结果不是有效的数字
+					m_watchValue = L"0.00";
+
 					CLabelUI* valueLabel = static_cast<CLabelUI*>(m_pm.FindControl(_T("value")));
 
 					valueLabel->SetText(L"0.00");

+ 1 - 1
zpzDll/Hook.cpp

@@ -127,7 +127,7 @@ BOOL WINAPI Mine_WriteFile(
 	BOOL ret = Real_WriteFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, lpOverlapped);
 
 	//同时满足发送数据的句柄和创建目标端口时候的句柄相等,以及工作的端口号等于最新的端口号,才进行监听
-	if (hFile == g_hPort && g_sworkComNum == g_sComNum)
+	if (hFile == g_hPort && (g_sworkComNum == g_sComNum || g_wsworkComNum == g_wsComNum))
 	{
 		//捕捉到一条客显消息,先把消息内容截取下来
 		DWORD nWirten = nNumberOfBytesToWrite;

+ 2 - 2
zpzDll/zpzDll.vcxproj

@@ -92,7 +92,7 @@
       <WarningLevel>Level3</WarningLevel>
       <Optimization>Disabled</Optimization>
       <SDLCheck>true</SDLCheck>
-      <PreprocessorDefinitions>WIN32;_DEBUG;ZPZDLL_EXPORTS;_WINDOWS;_USRDLL;HOOKAPI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>WIN32;_DEBUG;ZPZDLL_EXPORTS;_WINDOWS;_USRDLL;HOOKAPI_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <AdditionalIncludeDirectories>$(SolutionDir)include;</AdditionalIncludeDirectories>
@@ -130,7 +130,7 @@ copy $(SolutionDir)temp\link\$(Platform)\$(Configuration)\$(ProjectName)\zpzDll.
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <SDLCheck>true</SDLCheck>
-      <PreprocessorDefinitions>WIN32;NDEBUG;ZPZDLL_EXPORTS;_WINDOWS;_USRDLL;HOOKAPI_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;ZPZDLL_EXPORTS;_WINDOWS;_USRDLL;HOOKAPI_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <ConformanceMode>true</ConformanceMode>
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
       <AdditionalIncludeDirectories>$(SolutionDir)include;</AdditionalIncludeDirectories>

+ 2 - 2
zpzDll/zpzDll.vcxproj.user

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LocalDebuggerCommand>D:\Program Files %28x86%29\PosPalTouch\PosTouch.exe</LocalDebuggerCommand>
+    <LocalDebuggerCommand>D:\Program Files (x86)\PosPalTouch\PosTouch.exe</LocalDebuggerCommand>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
-    <LocalDebuggerWorkingDirectory>D:\Program Files %28x86%29\PosPalTouch\</LocalDebuggerWorkingDirectory>
+    <LocalDebuggerWorkingDirectory>D:\Program Files (x86)\PosPalTouch</LocalDebuggerWorkingDirectory>
   </PropertyGroup>
   <PropertyGroup>
     <ShowAllFiles>true</ShowAllFiles>