Problem in Writing to a Serial Port Using Mscomm32.ocx control
Hi,
In my windows application I am using Mscomm32.ocx control for serial communication.
I set the control properties like below in the Form1_Load event.
AxMSComm1.CommPort = 1
AxMSComm1.Settings = "9600,N,8,1"
AxMSComm1.InputLen = 0
AxMSComm1.PortOpen = True
AxMSComm1.SThreshhold=1
AxMSComm1.RThreshhold=1
I did the same way as mentioned in the following link.
http://support.microsoft.com/kb/139526/en-us
But I am getting the following error when I try to write data to a serial port using output method.
AxMSComm1.Output {"Exception from HRESULT: 0x800A018A (CTL_E_GETNOTSUPPORTED)"} Object
Please tell me why I am getting this error and how to resolve this???
Thanks in advance.
Re: Problem in Writing to a Serial Port Using Mscomm32.ocx control
Is there a reason you are not using the .Net SerialPort?
Re: Problem in Writing to a Serial Port Using Mscomm32.ocx control
Hi,
I developed a application for serial communication using that control.
I saw in so many websites where ever serial communication happend using this control they did in the same way.
I just want to know why I am getting that error????
Thanks for your reply.
Re: Problem in Writing to a Serial Port Using Mscomm32.ocx control
You may have better luck getting an answer in the VB6 forum. The is .Net and .Net has a SerialPort Class that I assume is a replacement for MSComm.
Re: Problem in Writing to a Serial Port Using Mscomm32.ocx control
The link you posted is for FoxPro.
Re: Problem in Writing to a Serial Port Using Mscomm32.ocx control
Hi,
in some other link also we can see the same thing.
http://msdn.microsoft.com/en-us/libr...8VS.60%29.aspx
my intension is writing data to a output buffer.
Re: Problem in Writing to a Serial Port Using Mscomm32.ocx control
Do you have VB6 installed on the same machine? If not, there may be a licensing issue (MSComm32.ocx is licensed to work with VB6). You can download NETComm.ocx, free, from my homepage -- www.hardandsoftware.net. It is licensed for any environment that supports ActiveX controls, and was originally developed for .NET.
Porting your code to use the built-in SerialPort object is the best move. Such a port shouldn't take more than an hour or so, even for a program that has a lot of serial port reads and writes. I'd really suggest that you go that route. I have a Terminal example on the same Software Downloads page that illustrates its use.
Dick
Re: Problem in Writing to a Serial Port Using Mscomm32.ocx control
I read in one post with the same error that there was a problem with the port settings. They didn't post the changes that were made to correct it so not sure how much help that would be to you. May be worth taking a look at however.