I need information on how to make use of the MSComm control to send/receive data. I hope someone will help me as i cannot seem to find any resources on how to do it.
> I need information on how to make use of the MSComm control to send/receive data. I hope someone will help me as i cannot seem to find any resources on how to do it. <
When you add the control to your project, you get an header file. There you can find the declaration of all the methods available. From this point you can use the VB example and make the approprite changes.
I tried to use GetOutput and SetOutput functions that were generated but i am unable to compile the program cause i am not sure how to convert CString to tagVariant and Vice-Versa. I would be very grateful if you could like provide sample code on how to send/receive data through the comm port using this MsComm Control
Here i am giving sample code for Using MSComm control in VC++ 6.0.m_objMSComm.SetCommPort(1);
1. Add MSComm control to your project.
2. Draw MSComm Control in your Dialog box.
3. Create an object m_objMScomm for your MSComm control.
4. Use following code to initialize you comm port.