mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-23 00:30:17 +00:00
SSC: Support COM ports greater than 9 (#707)
This commit is contained in:
parent
cb007df40b
commit
d23d091caa
@ -252,7 +252,7 @@ bool CSuperSerialCard::CheckComm()
|
||||
{
|
||||
_ASSERT(m_dwSerialPortItem < m_vecSerialPortsItems.size()-1); // size()-1 is TCP item
|
||||
TCHAR portname[SIZEOF_SERIALCHOICE_ITEM];
|
||||
wsprintf(portname, TEXT("COM%u"), m_vecSerialPortsItems[m_dwSerialPortItem]);
|
||||
wsprintf(portname, TEXT("\\\\.\\COM%u"), m_vecSerialPortsItems[m_dwSerialPortItem]);
|
||||
|
||||
m_hCommHandle = CreateFile(portname,
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
@ -1258,7 +1258,7 @@ void CSuperSerialCard::ScanCOMPorts()
|
||||
for (UINT i=1; i<32; i++) // Arbitrary upper limit
|
||||
{
|
||||
TCHAR portname[SIZEOF_SERIALCHOICE_ITEM];
|
||||
wsprintf(portname, TEXT("COM%u"), i);
|
||||
wsprintf(portname, TEXT("\\\\.\\COM%u"), i);
|
||||
|
||||
HANDLE hCommHandle = CreateFile(portname,
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
|
@ -83,7 +83,7 @@ private:
|
||||
//
|
||||
|
||||
public:
|
||||
static const UINT SIZEOF_SERIALCHOICE_ITEM = 8*sizeof(char);
|
||||
static const UINT SIZEOF_SERIALCHOICE_ITEM = 12*sizeof(char);
|
||||
|
||||
private:
|
||||
std::string m_ayCurrentSerialPortName;
|
||||
|
Loading…
Reference in New Issue
Block a user