Re: Please get this to work
Hi Bryan, it's me again!
I was wrong about the VARIANT_BOOL stuff - the MFC wrapper does the conversion from BOOL to VARIANT_BOOL for you.
So, where are we? I suggest you try the following:
#include <comdef.h> // for definition of _variant_t type
CString data("Stuff to send");
// convert data to a VARIANT
_variant_t var(data);
// select COM1
m_sendmessagesout.SetCommPort(1);
// open the port
m_sendmessagesout.SetPortOpen(TRUE);
// squirt data out of port
m_sendmessagesout.SetOutput(var);
// close port again
m_sendmessagesout.SetPortOpen(FALSE);