MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / CSuperSerialCard

Method CSuperSerialCard

source/SerialComms.cpp:69–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67//===========================================================================
68
69CSuperSerialCard::CSuperSerialCard(UINT slot) :
70 Card(CT_SSC, slot),
71 m_strSerialPortChoices(1, '\0'), // Combo box friendly, just in case.
72 m_uTCPChoiceItemIdx(0),
73 m_bCfgSupportDCD(false),
74 m_pExpansionRom(NULL),
75 m_hFrameWindow(NULL)
76{
77 if (m_slot == SLOT0)
78 ThrowErrorInvalidSlot();
79
80 m_dwSerialPortItem = 0;
81
82 m_hCommHandle = INVALID_HANDLE_VALUE;
83 m_hCommListenSocket = INVALID_SOCKET;
84 m_hCommAcceptSocket = INVALID_SOCKET;
85
86 m_hCommThread = NULL;
87
88 for (UINT i=0; i<COMMEVT_MAX; i++)
89 m_hCommEvent[i] = NULL;
90
91 memset(&m_o, 0, sizeof(m_o));
92
93 InternalReset();
94
95 //
96
97 const size_t SERIALCHOICE_ITEM_LENGTH = 12;
98 char serialPortName[SERIALCHOICE_ITEM_LENGTH];
99 std::string regSection = RegGetConfigSlotSection(m_slot);
100 RegLoadString(regSection.c_str(), REGVALUE_SERIAL_PORT_NAME, TRUE, serialPortName, sizeof(serialPortName), "");
101
102 SetSerialPortName(serialPortName);
103}
104
105void CSuperSerialCard::InternalReset()
106{

Callers

nothing calls this directly

Calls 2

RegGetConfigSlotSectionFunction · 0.85
RegLoadStringFunction · 0.85

Tested by

no test coverage detected