Commit da6f455d by 李定达

1.调整DoPrintWithXML不在加载dll;2.调整报错提示;

parent d12259e4
...@@ -8,3 +8,5 @@ PrtLib/PrtLib/Debug/ ...@@ -8,3 +8,5 @@ PrtLib/PrtLib/Debug/
*.sdf *.sdf
PrtLib/Release/ PrtLib/Release/
PrtLib/PrtLib/Release/ PrtLib/PrtLib/Release/
PrtLib/TestPrtLib/
*.opensdf
...@@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 11.00 ...@@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010 # Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrtLib", "PrtLib\PrtLib.vcxproj", "{597A700E-054E-438B-A0A5-B484BF0CBDF6}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrtLib", "PrtLib\PrtLib.vcxproj", "{597A700E-054E-438B-A0A5-B484BF0CBDF6}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPrtLib", "TestPrtLib\TestPrtLib.vcxproj", "{46BD73FE-16B1-494D-82D0-19CBEA18C10B}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32 Debug|Win32 = Debug|Win32
...@@ -13,6 +15,10 @@ Global ...@@ -13,6 +15,10 @@ Global
{597A700E-054E-438B-A0A5-B484BF0CBDF6}.Debug|Win32.Build.0 = Debug|Win32 {597A700E-054E-438B-A0A5-B484BF0CBDF6}.Debug|Win32.Build.0 = Debug|Win32
{597A700E-054E-438B-A0A5-B484BF0CBDF6}.Release|Win32.ActiveCfg = Release|Win32 {597A700E-054E-438B-A0A5-B484BF0CBDF6}.Release|Win32.ActiveCfg = Release|Win32
{597A700E-054E-438B-A0A5-B484BF0CBDF6}.Release|Win32.Build.0 = Release|Win32 {597A700E-054E-438B-A0A5-B484BF0CBDF6}.Release|Win32.Build.0 = Release|Win32
{46BD73FE-16B1-494D-82D0-19CBEA18C10B}.Debug|Win32.ActiveCfg = Debug|Win32
{46BD73FE-16B1-494D-82D0-19CBEA18C10B}.Debug|Win32.Build.0 = Debug|Win32
{46BD73FE-16B1-494D-82D0-19CBEA18C10B}.Release|Win32.ActiveCfg = Release|Win32
{46BD73FE-16B1-494D-82D0-19CBEA18C10B}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
No preview for this file type
...@@ -49,7 +49,7 @@ PrintLib::PrintLib(void) ...@@ -49,7 +49,7 @@ PrintLib::PrintLib(void)
// } // }
//} //}
m_b_load_sucfl = LoadAddress(); //m_b_load_sucfl = LoadAddress();
} }
void PrintLib::_PrintLine(rapidxml::xml_node<> *node,rapidjson::Document &jsonDoc, rapidjson::Value &childNode) void PrintLib::_PrintLine(rapidxml::xml_node<> *node,rapidjson::Document &jsonDoc, rapidjson::Value &childNode)
...@@ -172,7 +172,7 @@ void PrintLib::_XMLiterate(rapidxml::xml_node<> *node,rapidjson::Document &jsonD ...@@ -172,7 +172,7 @@ void PrintLib::_XMLiterate(rapidxml::xml_node<> *node,rapidjson::Document &jsonD
PrintLib::~PrintLib(void) PrintLib::~PrintLib(void)
{ {
Unloaddll(); //Unloaddll();
} }
PrintLib& PrintLib::GetInstance() PrintLib& PrintLib::GetInstance()
...@@ -226,14 +226,14 @@ bool PrintLib::DoPrint(std::string prtStr, std::string orderStr, std::string xml ...@@ -226,14 +226,14 @@ bool PrintLib::DoPrint(std::string prtStr, std::string orderStr, std::string xml
LOG() << "Order Info:" << orderStr; LOG() << "Order Info:" << orderStr;
LOG() << "XML Info:" << xmlStr; LOG() << "XML Info:" << xmlStr;
if(m_b_load_sucfl == false) //if(m_b_load_sucfl == false)
{ //{
if(!LoadAddress()){ // if(!LoadAddress()){
error = "LaodAddress failed"; // error = "LaodAddress failed";
LOG() << "f_LaodAddress failed\r\n"; // LOG() << "f_LaodAddress failed\r\n";
return false; // return false;
} // }
} //}
char prtjson[1024] = {0}; char prtjson[1024] = {0};
memcpy(prtjson, prtStr.c_str(), prtStr.size()); memcpy(prtjson, prtStr.c_str(), prtStr.size());
...@@ -862,7 +862,7 @@ MathArguments PrintLib::_ParseMathArgumnets( const rapidxml::xml_node<>* e ) ...@@ -862,7 +862,7 @@ MathArguments PrintLib::_ParseMathArgumnets( const rapidxml::xml_node<>* e )
void PrintLib::_PrintData( const LinePrintArguments& arguments ) void PrintLib::_PrintData( const LinePrintArguments& arguments )
{ {
std::string text = arguments.text; std::string text = arguments.text;
printf("%s\n",text); //printf("%s\n",text);
std::string printType = arguments.printType; std::string printType = arguments.printType;
int fontType = arguments.fontType; int fontType = arguments.fontType;
int fontStyle = arguments.fontStyle; int fontStyle = arguments.fontStyle;
......
...@@ -1588,12 +1588,12 @@ void CommPort() ...@@ -1588,12 +1588,12 @@ void CommPort()
if (g_hComm != INVALID_HANDLE_VALUE) if (g_hComm != INVALID_HANDLE_VALUE)
{ {
LOG() << "串口" << func << ",比特率" << g_info.baudrate << ",数据位"<< g_info.databits << ",停止位" << g_info.stopbits << ",校验位" << g_info.parity <<",控制" << g_info.flowcontrol; LOG() << "串口" << func << ",比特率" << g_info.baudrate << ",数据位"<< g_info.databits << ",停止位" << g_info.stopbits << ",校验位" << g_info.parity <<",控制" << g_info.flowcontrol;
LOG() << "驱动打开成功:" << func; LOG() << "串口打开成功:" << func;
} }
else else
{ {
LOG() << "驱动打开失败:" << func; LOG() << "串口打开失败:" << func;
} }
} }
...@@ -1607,11 +1607,11 @@ void ParallelPort() ...@@ -1607,11 +1607,11 @@ void ParallelPort()
if (g_hComm != INVALID_HANDLE_VALUE) if (g_hComm != INVALID_HANDLE_VALUE)
{ {
LOG() << "驱动打开成功:" << func; LOG() << "并口打开成功:" << func;
} }
else else
{ {
LOG() << "驱动打开失败:" << func; LOG() << "并口打开失败:" << func;
} }
} }
...@@ -1632,11 +1632,11 @@ void NetPort() ...@@ -1632,11 +1632,11 @@ void NetPort()
if (g_hComm != INVALID_HANDLE_VALUE) if (g_hComm != INVALID_HANDLE_VALUE)
{ {
LOG() << "驱动打开成功:" << func; LOG() << "网口打开成功:" << func;
} }
else else
{ {
LOG() << "驱动打开失败:" << func; LOG() << "网口打开失败:" << func;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment