|
@@ -40,6 +40,7 @@ bool CPosPrinter::InitShouyin()
|
|
|
//LOG_INFO("nDevice:" << nDevice);
|
|
//LOG_INFO("nDevice:" << nDevice);
|
|
|
int i = 0;
|
|
int i = 0;
|
|
|
|
|
|
|
|
|
|
+ //添加usb端口
|
|
|
while(i < nDevice)
|
|
while(i < nDevice)
|
|
|
{
|
|
{
|
|
|
Port = szDevicePath[i++];
|
|
Port = szDevicePath[i++];
|
|
@@ -60,6 +61,14 @@ bool CPosPrinter::InitShouyin()
|
|
|
m_hPorts.push_back(hPort);
|
|
m_hPorts.push_back(hPort);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ //开始添加并口的端口
|
|
|
|
|
+ std::wstring LptStr = L"lpt1";
|
|
|
|
|
+ HANDLE hPort = CreateFile(LptStr.c_str(), GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0);
|
|
|
|
|
+ if (hPort != INVALID_HANDLE_VALUE)
|
|
|
|
|
+ {
|
|
|
|
|
+ m_hPorts.push_back(hPort);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|