tags:

views:

366

answers:

2

Hello previously i was using VC++ 6.0 and MFC where i used Microsoft Communication Control 6.0 for serial communication its fine.But now i am using vc++.net 2003 and MFC, i added Microsoft Communication Control (MSComm1) but in class view there is no CMSComm class will creating . But in VC++ 6.0 if i add the this ActiveX Control.The CMSComm class will created by default where i can call member functions like SetPortOpen() , GetPortOpen() .

so any body tell me how to insert the MScomm control along with class.

Thanks in Advance

A: 

EDIT: I did this with VC# and am not sure if the steps are the same with VC++. I need to install it and try it before providing a better response.

Since serial port support wasn't added to .Net until version 2.0 I had to do the same thing for .Net 1.1 apps. In my project I added a reference to MSCommLib and added the MS Communications Control, version 6.0, to my toolbox. After dragging one onto the form I was able to program against it. You should also have a reference to AxMSCommLib, AxInterop.MSCommLib.dll (COM interop not port).

Sorry, I opened the project and can't find a way to add it to the Class View, but once you have a reference and create a variable like "private AxMSCommLib.AxMSComm com;" you can use the intellisense to see the methods and members of the object.

You can also see these with the Object Browser. If you have the reference set, open the object browser and then click on AxMSComm. All of the members should be listed in the pane to the right side. There isn't much help for how to use each of the members here.

Bratch
sorry Bratch i will not get more clear, will you me a sample or any steps that i can do myself. thank you.
sorry will you give me a sample or any steps to get more clear.
A: 

You may be having problems because this Microsoft update set the ActiveX killbit on the control. It will no longer function. MS suggests that we use a newer version of the control or the API.

R Ubben