Anonimus
asked on
MSComm control
Can you give (or direct) me to a C++ example of input and output from/to MSComm control (I got confused because of the variant)
what kind of problems do you have ?
You have a very usefull & detailed sample in the VC++ 5.0 MFC samples called "COMM Terminal" or something like this.
I use this many times as a squeleton for my proyects.
I don't know why but in VC++ 6.0 it doesn't appear. Sorry for the exactly but I don't have here the help of the 5.0 version.
I use this many times as a squeleton for my proyects.
I don't know why but in VC++ 6.0 it doesn't appear. Sorry for the exactly but I don't have here the help of the 5.0 version.
I correct the last sentence.
Sorry for don't have the exactly name but I don't have here the help of the 5.0 version.
Sorry for don't have the exactly name but I don't have here the help of the 5.0 version.
ASKER
my main problems are with the VARIANT parameter. - which how can I put the data that was received in CString?
- how (and do I have to) free the Variant memory allocation ? (all that BSTR stuff?
- how do I generate a VARIANT from CString ?
- how (and do I have to) free the Variant memory allocation ? (all that BSTR stuff?
- how do I generate a VARIANT from CString ?
So your problem is not MSComm your Problem is Variant
First Tip:
MFC has an Class that encapsulates the variant Structure
with a lot of assignment operators
the name of the Class is COleVariant.
it has an asignment operator for CString:
const COleVariant& operator =( const CString& strSrc );
I have used variant very often and I am quite familar with it so I am able to give you more help if you reject the answer
First Tip:
MFC has an Class that encapsulates the variant Structure
with a lot of assignment operators
the name of the Class is COleVariant.
it has an asignment operator for CString:
const COleVariant& operator =( const CString& strSrc );
I have used variant very often and I am quite familar with it so I am able to give you more help if you reject the answer
ASKER
In the MSFlexGrid I get VARIANT returned from the GetInput function. How can I convert the VARIANT to a CString?
It depends on what the variant contains
I am able to show you but I think you should reject the answer first.
I am able to show you but I think you should reject the answer first.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.