Bryan DeNosky
March 31st, 1999, 04:34 PM
I am taking a string and breaking it down character by character and trying to send it out a port. I have no clue how
to get it out the port though. Could someone describe in detail how and what variable to use to get it to go out the
port. I suck at C++ because I just started so please be very explicit with instructions.
//*******My code starts here*******
//space is the emptiness between individual messages
CString space(" ");
//lumps all messages into one data string to be sent out
CString data = m_display1 + space + m_display2 + space + m_display3 + space;
//get the length of the data string
int length = strlen(data);
int count = 0;
//initializes port
m_sendmessagesout.SetPortOpen(VARIANT_TRUE);
//transmission loop
while (count < length)
{
const struct tagVT_BSTR;
CString transfer = data.GetAt(count);
VT_BSTR.COleVariant(transfer);
m_sendmessagesout.SetOutput(VT_BSTR);
count++;
}
//close port
m_sendmessagesout.SetPortOpen(VARIANT_FALSE);
//*******My code ends here*******
to get it out the port though. Could someone describe in detail how and what variable to use to get it to go out the
port. I suck at C++ because I just started so please be very explicit with instructions.
//*******My code starts here*******
//space is the emptiness between individual messages
CString space(" ");
//lumps all messages into one data string to be sent out
CString data = m_display1 + space + m_display2 + space + m_display3 + space;
//get the length of the data string
int length = strlen(data);
int count = 0;
//initializes port
m_sendmessagesout.SetPortOpen(VARIANT_TRUE);
//transmission loop
while (count < length)
{
const struct tagVT_BSTR;
CString transfer = data.GetAt(count);
VT_BSTR.COleVariant(transfer);
m_sendmessagesout.SetOutput(VT_BSTR);
count++;
}
//close port
m_sendmessagesout.SetPortOpen(VARIANT_FALSE);
//*******My code ends here*******