Commit da6f455d by 李定达

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

parent d12259e4
......@@ -8,3 +8,5 @@ PrtLib/PrtLib/Debug/
*.sdf
PrtLib/Release/
PrtLib/PrtLib/Release/
PrtLib/TestPrtLib/
*.opensdf
......@@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrtLib", "PrtLib\PrtLib.vcxproj", "{597A700E-054E-438B-A0A5-B484BF0CBDF6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestPrtLib", "TestPrtLib\TestPrtLib.vcxproj", "{46BD73FE-16B1-494D-82D0-19CBEA18C10B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
......@@ -13,6 +15,10 @@ Global
{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.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
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
No preview for this file type
......@@ -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)
......@@ -172,7 +172,7 @@ void PrintLib::_XMLiterate(rapidxml::xml_node<> *node,rapidjson::Document &jsonD
PrintLib::~PrintLib(void)
{
Unloaddll();
//Unloaddll();
}
PrintLib& PrintLib::GetInstance()
......@@ -226,14 +226,14 @@ bool PrintLib::DoPrint(std::string prtStr, std::string orderStr, std::string xml
LOG() << "Order Info:" << orderStr;
LOG() << "XML Info:" << xmlStr;
if(m_b_load_sucfl == false)
{
if(!LoadAddress()){
error = "LaodAddress failed";
LOG() << "f_LaodAddress failed\r\n";
return false;
}
}
//if(m_b_load_sucfl == false)
//{
// if(!LoadAddress()){
// error = "LaodAddress failed";
// LOG() << "f_LaodAddress failed\r\n";
// return false;
// }
//}
char prtjson[1024] = {0};
memcpy(prtjson, prtStr.c_str(), prtStr.size());
......@@ -862,7 +862,7 @@ MathArguments PrintLib::_ParseMathArgumnets( const rapidxml::xml_node<>* e )
void PrintLib::_PrintData( const LinePrintArguments& arguments )
{
std::string text = arguments.text;
printf("%s\n",text);
//printf("%s\n",text);
std::string printType = arguments.printType;
int fontType = arguments.fontType;
int fontStyle = arguments.fontStyle;
......
......@@ -1588,12 +1588,12 @@ void CommPort()
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;
LOG() << "串口打开成功:" << func;
}
else
{
LOG() << "驱动打开失败:" << func;
LOG() << "串口打开失败:" << func;
}
}
......@@ -1607,11 +1607,11 @@ void ParallelPort()
if (g_hComm != INVALID_HANDLE_VALUE)
{
LOG() << "驱动打开成功:" << func;
LOG() << "并口打开成功:" << func;
}
else
{
LOG() << "驱动打开失败:" << func;
LOG() << "并口打开失败:" << func;
}
}
......@@ -1632,11 +1632,11 @@ void NetPort()
if (g_hComm != INVALID_HANDLE_VALUE)
{
LOG() << "驱动打开成功:" << func;
LOG() << "网口打开成功:" << func;
}
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